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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Vignesh.A Profile Picture
    203 on at

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 470

#3
Adis Profile Picture

Adis 270 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans