” creating a trigger on the source table”
SmartConnect does not create a SQL trigger on the source CRM table.
Instead, SmartConnect registers a plug-in entity event with the CRM SDK. However CRM handles that event is what it is.
When CRM saves a record, it fires the event in question and passes the data from that record inserted/changed into the plugin which then passes the data from it to the eOne web service.
Because of this, @@identity or @@scope_identity don’t come into play at all.
Thanks for a quick reply. To clarify, the “source” here is our e-commerce based system, CRM is destination and is not a concern. We have implemented another integration with CRM using SmartConnect where the “source” is in-house SQL Server database, and verified that triggers were created and it had an impact behavior of @@identity variable. We were able to come up with a work around, however, with E-Commerce server we might be quite limited.
I’m going to stick with my original answer.
For change or realtime events, SmartConnect registers an event on the event in MS CRM using the CRM SDK. the event fires the SC plugin that is registered and passes it the entity/data to be parsed.
If CRM is passing in the wrong data to the plugin due to @@identity/@@scope_identity, there isn’t anything the SmartConnect can do about it or even kno w that occurred.
Thanks, but it does not address my concern on “source” tables in our in-house SQL Server and has nothing to do with CRM.
As you made it a point of mentioning CRM, I had assumed you meant a CRM trigger instead of a SQL db trigger.
If you can examine the SQL db trigger that is created on the table, for both realtime or change triggers, we can see that in both cases that SQL passes us the “INSERTED” table that the trigger table would then either log into a tracking table or calling the eone web service. If there is an identity column in that table – it would be passed into the proc as the INSERTED record and we’d use whatever that values is (if needed because it was a key) wherever it came from.
So SC doesn’t look at @@identity or @@scope_identity directly either way.
If you would like to submit an answer or comment, please sign in to the eOne portal.