I was wondering what inputparameters and outparameters are passed by the platform to the IPluginExecutionContext’s context. Just created a simple plugin and registered it for (Pre/Post)Create,Update, Delete event of lead. And debugged it in visual studio to know the values for these parameters
InputParameters will have the parameters of the request message whi ch triggered the event i.e Represents the data that was passed along with the request to the platform. It will have two keys Target and OptionalParameters
Target property will be passed as a DynamicEntity and represents the image of the data passed.
OutputParameters is populated by the platform and only contains valid data during the After
Operation stage. This will contain the properties of the response message. The most common property returned is an “id” entry that will represent the Guid. In that example, it works exactly the same way the Request will produce a Response object with an id property. You would use this value to do subsequent processing that you need the entity Id value to be able to relate data.
OutputParameters will have the properties of the response message which is returned as part of pipeline execution. It will have one key OptionalParameters.
For PreCreate
Inputparameters – Two key – Target and OptionalParameters
Target – It had 35 properties basically one for all the attributes with its corresponding values
For optional parameters it had following value
CreateDuplicatesOptionalParameters with the value as false.
For PostCreate.
InputParameters – Target – same 35 properties for each attribute.
OutputParameters – Had one key – id with values of the newly created lead.
For PreUpdate
InputParameters – It had attributes whose values have been modified , leadid (primarykey of lead) as well those attributes that have forceSubmit true.
CreateDuplicatesOptionalParameters with the value as false.
Outputparameters – Nothing in output parameters
For PostUpdate
InputParameters – It had attributes whose values have changed, leadid (primarykey of lead), as well those attributes that have forceSubmit true.
CreateDuplicatesOptionalParameters with the value as false.
Outputparameters – Nothing in output parameters.
For PreDelete
Target was of type -Microsoft.Crm.Sdk.Moniker having Id of the record to be deleted and name as entity name – lead
For create,update message Target property was -Microsoft.Crm.Sdk.DynamicEntity.
Nothing in OptionalParameters
Outputparameters – Nothing in output parameters.
For PostDelete
Target was of type –Microsoft.Crm.Sdk.Moniker having Id of the record to be deleted and name as lead
Nothing in OptionalParameters
Outputparameters – Nothing in output parameters.
To know more about inputparameters and outputparameters
http://www.patrickverbeeten.com/pages/ContentItemPage.aspx?id=12&item=53&p=true
Bye..
