Community
Showing results for 
Search instead for 
Do you mean 
Reply

Company Field Won't Update?? Am I doing it wrong?

Accepted Solution Solved
Copper Contributor
Posts: 34
Country: United States
Accepted Solution

Company Field Won't Update?? Am I doing it wrong?

OK I am at a loss again. When I execute this simple method to locate a field and update the text value of that field I get:

 

Invalid name format: CUST_CompFaxID_055231952
Parameter name: realName

I understand the error. The string name I am sending in is not formatted how ACT wants it. But I don't know how it wants it.

Now this field is a user added field on a custom tab but it errors out looking for a default field as well.

  

CompToUpdate.CompanyFields[
"CUST_CompFaxID_055231952" , true] = strGuid;

CompToUpdate.Update();

References.ActApp.RefreshLoadedViews();

 

This doesn't work either:

 

CompToUpdate.CompanyFields["CompFaxID" , true] = strGuid;

CompToUpdate.Update();

References.ActApp.RefreshLoadedViews();

Was this post helpful? If so please take a moment to learn a little bit about my ACT! products for yourself or resell to your clients.

Thank You
JB

http://www.axciant.com/act/actrecordescape.asp

Accepted Solutions
Solution
Accepted by topic author ramjet
‎09-25-2015 03:20 AM
Nickel Super Contributor
Posts: 441
Country: UK

Re: Company Field Won't Update?? Am I doing it wrong?

if you set real name to true you need to use tablename.fieldname eg (note it may not be TBL_CONTACT, check in fields detailed report from actdiag) :

 

CompToUpdate.CompanyFields["TBL_CONTACT.CUST_CompFaxID_055231952" , true] = strGuid

 

If you set it to false use contact/company/group.fieldname eg.

 

CompToUpdate.CompanyFields["Contact.CompFaxID" , false] = strGuid;

 

Tom

 

View solution in original post


All Replies
Solution
Accepted by topic author ramjet
‎09-25-2015 03:20 AM
Nickel Super Contributor
Posts: 441
Country: UK

Re: Company Field Won't Update?? Am I doing it wrong?

if you set real name to true you need to use tablename.fieldname eg (note it may not be TBL_CONTACT, check in fields detailed report from actdiag) :

 

CompToUpdate.CompanyFields["TBL_CONTACT.CUST_CompFaxID_055231952" , true] = strGuid

 

If you set it to false use contact/company/group.fieldname eg.

 

CompToUpdate.CompanyFields["Contact.CompFaxID" , false] = strGuid;

 

Tom

 

Copper Contributor
Posts: 34
Country: United States

Re: Company Field Won't Update?? Am I doing it wrong?

That was indeed it. Thank You!

 

Working Code snippet:

 

CompToUpdate.CompanyFields["TBL_COMPANY.CUST_CompFaxID_055231952", true] = strGuid;

CompToUpdate.Update();

References.ActApp.RefreshLoadedViews();

Was this post helpful? If so please take a moment to learn a little bit about my ACT! products for yourself or resell to your clients.

Thank You
JB

http://www.axciant.com/act/actrecordescape.asp