Setting the Scene
Imagine we have an application that uses the CRM SDK. It needs to:
- Create a new
account
entity in crm.
- Get some value that was just generated as a result of a synchronous plugin that fires on the create. For example, suppose there is a plugin that generates an account reference number.
The “I don’t care about network latency method!”
The ‘I don’t care about network latency’ way of dealing with this is to just do 2 seperate Requests (roundtrips) with the CRM server.
- Create the new
account
which returns you the ID.
- Retrieve the
account
using that ID, along with the values that you need.
This approach is sub optimal where network latency is a concern, as it incurs the penalty of making two roundtrips accross the network with the server, where 1 is possible.
Let’s now have a look at the “I’m running on a 56k modem method” of doing the same thing!