Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Is there a way to set contextual data for plugins to see when using a transaction? Shared Variable perhaps?

$
0
0

I'm using a transaction to send multiple requests as in the example here: https://msdn.microsoft.com/en-us/library/mt634414.aspx

We have a plugin that validates records based on data in other records (we have business rules about whether a record is "consistent" with other records of the same type, and whether records of a certain type are considered duplicates).

For my batch of records, I need to tell the plugin to ignore validation, since the records will be considered inconsistent and/or duplicate until after the entire batch is done updating.

My question is, is it possible to add a piece of data to the transaction to tell the plugin to ignore its validation check? I was hoping to set a Shared Variable when setting up the transaction but it doesn't look possible. Another possibility is ExtensionData on the transaction, but I can't figure out how to use it, and even if I do, I don't know whether it gets passed along the plugin pipeline.

If worse comes to worst, I'll create an attribute on my entity telling the plugin to ignore validation, and then let the plugin set this attribute back to "do validation," but that seems extremely klugey.

Any ideas?


Viewing all articles
Browse latest Browse all 79901


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>