Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

Warning in Purchase Requisition form

Posted on by 114
Hi all
 
When I create "Purchase requisition lines"  if I delete the content of the unit field, I get the error " Field  'unit ' must be filled in.".
I want to add a new validation: "Field 'Vend Account' must be filled in." and add Reason mandatory validation in the purchase requisition header [ (PurchReqTable).BusinessJustification], I didn't find the code to validate if it's empty, where should I add the validation code?
 
Thanks 
B.R
  • Martin Dráb Profile Picture
    Martin Dráb 227,969 Super User 2024 Season 2 on at
    Warning in Purchase Requisition form
    No, it's not true. It applies to other data types too.
  • Danzel Zuo Profile Picture
    Danzel Zuo 114 on at
    Warning in Purchase Requisition form
    Thanks Martin,
    Addendum: only the string type can be controlled in this way
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 227,969 Super User 2024 Season 2 on at
    Warning in Purchase Requisition form
    This doesn't require code - if you make a field mandatory, the system will validate whether a value has been filled in.
     
    Note that if you make an existing field mandatory, it'll make all existing records without a value invalid and users won't be able to update such records (without setting the field value). You should fix the existing records before you let users use the system.

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,969 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans