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..
Hi Nishant,
Can you please send me the code for (pre/post) delete event.
I need to prevent delete for some custom entity for some condition. I am not able to do this using jscript.
Please if you can help me it will be appreciable.
Thanks & Regards,
Bhavika Patel
bhavika.2711@gmail.com
LikeLike
This is exactly what I was looking for. Many thanks!
LikeLike
An intriguing discussion is worth comment. I think that you
ought to publish more about this subject,
it may not be a taboo matter but generally folks don’t talk about these topics.
To the next! Best wishes!!
LikeLike
Its not my first time to pay a quick visit this web site, i am visiting this website dailly and take pleasant data from here everyday.
LikeLike
You’re so awesome! I don’t suppose I’ve read through anything like this before.
So good to discover someone with some unique thoughts on this issue.
Really.. thanks for starting this up. This web site is one thing that’s needed on the
web, someone with a bit of originality!
LikeLike
My brother recommended I would possibly like this website.
He used to be totally right. This post actually made my day.
You cann’t believe simply how much time I had spent for this information! Thanks!
LikeLike