Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, June 29, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please
mark
Posts: 70
 
Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 11 6:43 AM
fiogf49gjkf0d

Hi,


I want to autofill the leadsource lookup in the insert opportunity screen and i am using the belwo code. But i am not getting any value in it. If any body please help me in this issue.


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




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


 


I have used above code in the page load event and also on account lokkup change event but still no luck. Am i Missing some thing


 


Thanks In Advance


  


Please Help


 


Mark

 





 

[Reply][Quote]
Brian Segers
Posts: 69
 
Re: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 11 9:50 AM
fiogf49gjkf0d

Your problem is that Lookup is bount by Entity and Not ID, you have to set the entity object


 You need somthing like this.


You could just remove .Id so you are left with


lueLeadSource.LookupResultValue = opp.Account.LeadSource;


Or i would do somthing like below.


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




{



	Sage.Entity.Interfaces.ILeadSource leadSource = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.ILeadSource>(opp.Account.LeadSource.Id);

	opp.LeadSource = leadSource;


}




 








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

[Reply][Quote]
Brian Segers
Posts: 69
 
Re: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 11 9:54 AM
fiogf49gjkf0d

My Code formating got mixed up.


 


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




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


 Sage.Entity.Interfaces.ILeadSource leadSource = Sage.Platform.EntityFactory.GetById<Sage.Entity.Interfaces.ILeadSource>(opp.Account.LeadSource.Id);

opp.LeadSource = leadSource;


 }

 





 



 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 11 10:09 AM
fiogf49gjkf0d

No need to create a additional Objects...


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



 

[Reply][Quote]
Brian Segers
Posts: 69
 
Re: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Jan 11 10:17 AM
fiogf49gjkf0d

Raul.....


Thanks for the correction, must be too earlyt in the morniung fro me to be responding to posts


 


Brian

[Reply][Quote]
mark
Posts: 70
 
Re: Insert Opportunity LeadSource AutoFill ...Urgent Help Needed Please Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 11 5:30 AM
fiogf49gjkf0d

Thanks for the Replies Brian and Raul! That worked Well!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/29/2025 4:48:34 AM