Get quotenumber (Quote ID) on PostCreate plugin

Hi,

I got the following comment on my blog.

“I wrote a plugin that creates a folder in SharePoint. It works just fine. However, I need to be able to use the quotenumber as the folder name. I am having problems figuring out how to retrieve that value. I am able to retrieve values of other fields, but the quote number is assigned when the record is saved. I am guessing that the quote number is not getting assigned until after the plugin is being called. I am not sure what to do. Any ideas?”

So i thought of trying it out. I created a Post Create plugin (synchronous) against quote entity. Than wrote code to retrieve the value for quotenumber from the inputparameters property bag. As it was create event i thought the value must be there for it. However i saw that the quotenumber property is not being passed as a part of inputparameters.

So than I used ForceSubmit method to get its value. However this time i was getting blank value. Than tried by registering the post entity image, but was still getting the blank value.

Finally i tried by registering the plugin in child pipeline, and to my surprise the value was there for the quotenumber attribute.

So to get the quotenumber we need to register our plugin in post create and childpipeline. ( no need of ForceSubmit method or PostEntityImage)

I hope it helps !

 

Bye.


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Get quotenumber (Quote ID) on PostCreate plugin”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s