Using Alternate keys is an easy way to stop doing pre and post checks for whether you can insert data into Dynamics.
Before you had to do a check behind the scenes for whether an “Id” existed and if not go and insert it.
Now using the “Upsert” pattern in Dynamics, you can accomplish this task in one method call using an alternate key.
At’s it’s most simplest implementation, I created a custom entity and a field (wholenumber) that I then declared as my alternate key.
Then I wrote the following code to insert the following record into my system. You can