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)

salesorder recalculate feature execute with code

(0) ShareShare
ReportReport
Posted on by 2,379

Hi all,

I need to execute OOB "salesorder recalculate price" feature with code (c# or call webapi etc). Is there any way to do it?

My problem is;

I have a salesorder and multiple items (salesorderdetail), for exp. total amount is 10$. If I delete a salesorderdetail (2$ price) with web API call salesorder 's totalamount does not calculated until open record from UI. when you check advanced find still see 10$.

When I develop XrmLibrary I found something like this but a bit different, when you convert salesorder to invoice with SDK (ConvertSalesOrderToInvoiceRequest) invoice total amount not calculated until open record or perform any request on this record with SDK (https://github.com/emregulcan/xrmlibrary.2015/issues/5) .

Regards

*This post is locked for comments

I have the same question (0)
  • Emre GULCAN Profile Picture
    2,379 on at

    Is there any idea?

  • Verified answer
    David Jennaway Profile Picture
    14,065 on at

    This may sound a bit odd, but try using a Retrieve request on the salesorder, and include the totalamount column in the column set. CRM does the recalculation on a Retrieve

  • Emre GULCAN Profile Picture
    2,379 on at

    Hi David,

    Thank you for your response, I discovered this little trick before.

    This buggy feature inside all SFA entities and I think it's about SQL command running order. Retrieve or other update request messages trigger calculation process (details on github.com/.../5)

  • Nikhil Kumar Kakkireni Profile Picture
    on at

    Please use review.docs.microsoft.com/.../recalculateprice-action

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