This scenario shows you how xCache can help you when you are working in multiple CRM environments.
For this example we will assume 2 CRM instances:
- A Test instance
- A Production instance
The sales agents process payments via a third party payment gateway that opens up in a new html window. When the agents are working in Production, we want to reach the Live payments gateway, when anyone generates the payment link from CRM in Test we want them to reach the Test payments page.
Instead of changing formulas or xCache settings each time we move a solution from Test to Production, we instead create 2 xCache records, then N52 will automatically use the correct URL for the instance it is in.
To achieve these we use the Org Name Key field on an xCache record.
N52 BPA Solution
The BPA solution works like this:
- We create 2 xCache records in CRM
- Both have the same Category and Base Key, but different values for Org Name Key
- For each xCache record we put the URL of the payment site into the Value field
- We then use a single formula call to open the payments window from CRM
The xCacheGetGlobal() function return the value that matches the Org Name Key that matches the current organisation the formula is running in.
In Test it will generate the test link, in Production it will generate the production link.
Configure the formula
The following set of steps will set this formula up for you:
- Create a new formula of type Clientside - Perform Action
- Set the Source Entity to Account
- Set the Source Property to the form action/field you wish to trigger this fomula
- Copy and paste the formula below into the formula description field
- Click Save and then test
The above Org ID names are from CRM OnPremise where it is easy to customize your Org names. xCache works just as well for Online CRM, the only difference is that you must find your Org Id.
You can find it via -> Settings -> Customizations -> Developer Resources