Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Update sales order type to Sales order from Journal on approval

(0) ShareShare
ReportReport
Posted on by 15

Hi,

We have a custom workflow on Sales order form. The requirement is that when a sales order status is set to approved, the sales order type should be changed to Sales order from Journal.

If we use the doupdate method of sales line to change the type, it is getting changed but since the others methods are not getting called, the inventrans is not getting created for those lines, if we use the update method, inventtrans is getting created but the unit price in sales line is getting changed to zero.

Also, one thing I've noticed is that sales line history is also not there in the saleslinehistory table for the approved sales order.

May I know if I'm missing anything in this case.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,969 Super User 2025 Season 1 on at
    RE: Update sales order type to Sales order from Journal on approval

    Hi Dynamics noob,

    This is a long time ago for me that I looked into this field. I thought the field value has a reference to the table PriceDiscChangePolicy. You can check what table and then what would be the best value to use to prevent having the price or discount overwritten.

  • dynamics noob Profile Picture
    dynamics noob 15 on at
    RE: Update sales order type to Sales order from Journal on approval

    Hi Andre,

    Thanks for the reply.

    Yes, approving and automating is a part of customization.

    On further analysis, we've observed that the unit price is getting removed due to the change in sales line field 'ManualEntryChangePolicy'. If the field contains value '5637144576' , then it works fine, otherwise the unit price gets removed to zero while converting from journal to sales order.

    While we're trying to figure out the actual cause of getting this value removed, could you please share some information on use of this field and can we restore its value to '5637144576' ?

    This field has a relation with the PriceDiscChangePolicy table, could you please suggest what should we do in this case and how will it impact the system if we restore the same value (before removal) in this field.

    Thanks

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,969 Super User 2025 Season 1 on at
    RE: Update sales order type to Sales order from Journal on approval

    Hi Dynamics Noob,

    I do assume this approval and automating the sales order type is a customization? Have you checked what happens with the price when you change the type manually? I would recommend checking what exact logic is being called when you change the type. Then you can call that logic before the doupdate.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans