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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 700 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 567 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 408 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans