How Can I Access Contacts of an Account in a Textbox on a SmartPart in SalesLogix Web v7.5?

Question: I have created object of Account Interface as follows:

IAccount oAccount = GetCurrentEntity() as IAccount;

within oAccount, i get the property as oAccount.Contacts

How can I access Contacts of an Account in a Textbox on a SmartPart in SalesLogix Web v7.5?

Answer: Contacts are a collection.  Try something like this:

foreach (Contact ct in oAccount.Contacts)
{

ct.FirstName = ‘First Name’;
ct.Save();
}

Note: Use Sage.SalesLogix.Entities as the namespace for “Contact ct in oAccount.Contacts”.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!