Skip to main content

Notifications

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

How to override values supplied from pricediscpolicydialog() when creating purchline from purchAutoCreate_Sales

(0) ShareShare
ReportReport
Posted on by

Hello ,

I am creating purch orders automatically via X++ using purchAutoCreate_sales , everything works just fine.

Only issue notice is that purchline is created with price configured at Item level and my objective is to create purchline with values supplied to system via code.

Please share what can I do to ensure that purchline price are set to values in code and do not use item or any preconfgured price in system when creating purchorder via purchAutoCreate_Sales

Thanks

Mav

  • Vignesh.A Profile Picture
    Vignesh.A 203 on at
    RE: How to override values supplied from pricediscpolicydialog() when creating purchline from purchAutoCreate_Sales

    Hi Mav,

    Since the method createPurchaseLine in PurchAutoCreate_Sales Class is defaulted with Parameters, the price search happens by default. And We do not have any possibility of changing the parameters sent to createLine method using extensions for this specific scenario.

    Only option we can think of is We can take CoC of PurchAutoCreate_Sales.createLine() method and update the purchase line price with the value we have through code.

    Even OOB code we can see them updating the purchase line after creation on the same method.

    Note:-Do not forget to trigger the modifiedField method for the purch price field if you are updating the price field since.

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…

Vahid Ghafarpour – Community Spotlight

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

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans