Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Validation on PO Update order lines Form

(1) ShareShare
ReportReport
Posted on by 37
Hi Champs; 

I am working on a requirement to customize the purchase order form. The requirement is that when the Warehouse value on the purchase order form is changed, a new dialog form should open, as shown below. I want to add some validation to the OK button on this dialog form.

Can someone guide me on which class or form the system uses to pass parameters to the dialog?

Basically some warehouse we don't want to receive items any more, so i want to display an error message on this form once the user clicks the ok button.

I am using D365 FO...

 

Categories:
  • MA-07051407-0 Profile Picture
    MA-07051407-0 37 on at
    Validation on PO Update order lines Form
    Hi Martin;
    Thank you for your response. Actually, I wrote the validation in the validateField method of the PurchTable. However, the end user is requesting that the validation should only work when the warehouse value is changed in the header, and the 'Update site and warehouse' option is set to 'Yes.' Otherwise, the system's default functionality will work.
     
    Can you please guide further on, which methods i have to extend or write COC?
     
    Thanks and Regards
     
     
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Validation on PO Update order lines Form
    It's done in PurchTable2LineUpdatePrompt class and its parent, SalesPurchTableToLineUpdatePrompt.
     
    But if you consider the warehouse invalid, are you sure you want to save on the order header at all? If you reject it straight away, you wouldn't have to deal with the dialog (and the logic for initialization of new lines, which you probably forgot about).

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans