05-04-2009 08:29 AM
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();
05-05-2009 02:19 AM
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
05-05-2009 02:19 AM
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
05-05-2009 09:29 AM
That was indeed it. Thank You!
Working Code snippet:
CompToUpdate.CompanyFields["TBL_COMPANY.CUST_CompFaxID_055231952", true] = strGuid;
CompToUpdate.Update();
References.ActApp.RefreshLoadedViews();