Autofilling the Lead Source Lookup in SalesLogix

Question: I’m trying to autofill the LeadSource lookup on the SalesLogix insert opportunity screen and I’m using this code:

Sage.Entity.Interfaces.IOpportunity opp = this.BindingSource.Current as Sage.Entity.Interfaces.IOpportunity

lueLeadSource.LookupResultValue = opp.Account.LeadSource.Id;

This is not returning a
value.  I tried using this code on the page load event and the Account
lookup change event without success.  Any help would be appreciated.

Answer: The lookup is bound by the Entity, not the ID, which is
causing your problem.  You need to set the entity object.  You could
remove .Id so that you are left with this: lueLeadSource.LookupResultValue = opp.Account.LeadSource;

You could also try this:

if(opp.Account != null&& opp.Account.LeadSource != null){

  opp.LeadSource = opp.Account.LeadSource;




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) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!