Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
Posts: 3
Registered: ‎11-04-2013
Accepted Solution

Pass custom field values to Insert Sales Order based on Account or Opportunity entity

I have 3 custom lookup fields I've inserted on the Acct, Opp & Sales order entities. How can I get the 3 custom lookups on Insert Sales Order to automatically populate base on the entity from which the Sales Order was started or created from.

 

For example, if the Insert Sales Order is created from the Account view, I need to pass the values of the custom lookups from the Account view to auto populate on the Insert Sales Order. If the Insert Sales Order is started from the Opportunity view, I need the Opportunity values to auto populate the lookups on the Insert Sales Order.

 

Would I do this with C# or JavaScript? Maybe some type of condition statement or switch case?

 

Any help would be appreciated!

Nickel Contributor
Posts: 56
Registered: ‎10-26-2010

Re: Pass custom field values to Insert Sales Order based on Account or Opportunity entity

Look at the OnCreate of Opportunity in the business rules. OnCreate calls a function SetDefaultContext to default properties from a Contact, Account, or Opportunity.

 

Regards,

Collin Campbell

New Member
Posts: 3
Registered: ‎11-04-2013

Re: Pass custom field values to Insert Sales Order based on Account or Opportunity entity

Thanks so much for the help Collin!

 

Do you mean, look under Sales Order?

Nickel Contributor
Posts: 56
Registered: ‎10-26-2010

Re: Pass custom field values to Insert Sales Order based on Account or Opportunity entity

Use a decompiler to reflect the sage.saleslogix.businessrules.dll

 

As an example you can see how opportunity handles the OnCreate and setting default context. Then create an OnCreate as a prestep event for Sales Order to fit your needs.

Highlighted
New Member
Posts: 3
Registered: ‎11-04-2013

Re: Pass custom field values to Insert Sales Order based on Account or Opportunity entity

Ahh - I see what you mean....thanks again!