web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting extended field amount in QuoteDetail

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am fairly new to developing plugins.

I am trying to get the value of the ExtendedAmount field in quotedetail. I have created a plugin on update with a Post operation and using image to obtain the value. 

This works if I create a new quotedetail but when I update the quotedetail and the extended amount value gets updated I am not able to get the value of the amount.

Can anyone please help, how to get the value of ExtendedAmount and what kind of step to use.

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Anas Rafik Profile Picture
    365 on at

    if the field ExtendedAmount  get updated you will find it in the plugin execution context

    // Obtain the target entity from the input parameters.

    IPluginExecutionContext context = (IPluginExecutionContext)
                    serviceProvider.GetService(typeof(IPluginExecutionContext));
     Entity entity = (Entity)context.InputParameters["Target"];

    Money extendedAmount= (Money)entity.Attributes["extendedamount"];

  • Community Member Profile Picture
    on at

    Hi Anas ,

    I tried using it as well but there isn't any "extendedamount" attribute present. As this value is read only and gets updated after the "Save" of the entity. (Not even in Postoperation create)

  • Anas Rafik Profile Picture
    365 on at

    Can you please put a screenshot of the registered step and the plugin code

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Please make sure the following

    01. In the plugin registration tool, check the image and make sure all the attributes are being passed. if an attribute is not being passed in the image, you wont be able to get the attribute or value.

    02. I would add trace line or throw invalid plugin execution exception to see if the attribute is being passed to the plugin

    You could try something like the following

    if (!entity.Attributes.Contain("extendedamount"))

    throw new InvalidPluginExecutionException("Property extendedamount not passed in the image");

    03. You could query the same quote detail using advance find , add the extended column and see if it has value or check on the quote details form if the field has value. If a field does not have value, it may not be passed in the entity image

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans