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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Confirm button In purchtable form enable and disable

(0) ShareShare
ReportReport
Posted on by 371

hello every one...

want to know that "Accounts payable >> All purchase orders >> purchase orders"..when we create the purchase order. we select the item there unit price come..i make there customise fileds name is "maximum price".. suppose in maximum price there is "800" and the user type in the unit price is "810" and when it save the confirm i.e purchase tap >>confirm ...will disable an when the user type below the value of maximum price confirm button enable can any one suggest me how can we achieved this............. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You should auto-declate the confirmation button. The override the modified method on PurchTable form\Data sources\PurchTable\Fields\YourCustomField\Methods, and put the logic in there to enable/disable the autodeclared confirmation button form control depending on the value of your field. Alternatively you may put it in the modified method of your formintcontrol within the form design itself.

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at

    I am afraid that overriding form control may not a good solution.

    An alternative opportunity that can be consistent/in-line with existing AX structure is putting your logic in here given next path

    AOT\Classes\PurchTableType\canPurchaseOrderBeUpdated

    There are solid reasons for this. If you are inserted to know, let me know, I can state those

  • CU02060633-1 Profile Picture
    371 on at

    @Vilmos Kintera  thanks for the reply......i put the customise filed in the purchline table and already try this method in the purch line but it not works there ......

  • CU02060633-1 Profile Picture
    371 on at

    thanx @Sohaib Cheema...i put the customise in the purchline beacse all data is going in the line..so want to enable and disable the confirm button on the  unit price...

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at

    @Vinay Tak,

    would you mind, explaining your last message?

    what you have added in purchLine and how adding code on table can handle your form controls...???

  • CU02060633-1 Profile Picture
    371 on at

    @Sohaib Cheema ......actually when we create the po while select the item we get some auto fill in the grid not i put one of the filed is maximum i that there is predefined value 800 if the user type the unit price above 800 confirm button disable if less confirm button enable  

  • Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at

    fine, till that point. I can understand that you are filling a customized field named maximum price with initvalue of selection of item.

    But this does not ends the story to fulfil your requirement.

    can you have a look at above method suggested to block confirmation of PO?

  • Suggested answer
    Basheer17 Profile Picture
    2,720 on at

    Hi Vinay,

    Consider this scenario, what if PO has more than one line (Ex: Take just 2 lines one satisfies your condition and one doesn't) then enabling and disabling the confirm button will make less sense. I would suggest instead of enabling/disabling the button write the code for validations (based on max price in your case) after clicking the confirm button.

  • CU02060633-1 Profile Picture
    371 on at

    @Basheeruddin Mohammad...I agree with you .....but we have the req.. now the button is disable...but the issue came as u told that creating multiple line its not work....can we do some thing that when the user create the multiple line if aniline "unit price is greater then the customise filed the button will remain disable..........

  • Suggested answer
    Basheer17 Profile Picture
    2,720 on at

    Hi Vinay,

    Yes it's doable you have to override the modified() method and validate whether the current purchase line satisfies your condition. And in the same method you should check if there are any existing purchase lines, get the purchase order number loop through its existing lines. If condition fails for any one of existing purchase lines + current purchase line disable the confirm button.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans