A new knowledge base article has been published on our support portal.
In this scenario our business requirement is that when a user creates a new Opportunity in the CRM system a default Price List is automatically set when the Opportunity is created.
[Set the price List Lookup on create event of a new Opportunity]
N52 Formula Manager Solution
The Formula Manager solution works like this,
- We create a server-side only formula that fires for just when a Opportunity gets created.
- The formula itself first looks up the guid of the price list by using the FindValue() function to lookup the guid by referencing its name ‘Sage line 50 Price List’
- It then uses this to set the price list lookup field
Note : One big advantage of using the FindValue() function to lookup up the guid of the Price List is that when you deploy the formula to your Test, UAT, Production, etc. environments you don’t need to do any additional steps. As even though the underlying guid will change from system to system the formula will just lookup the guid at runtime.