Skip to main content

Notifications

Microsoft Dynamics AX forum
Unanswered

on which method should the warning be thrown for a field just entered the value on

editSubscribe (1) ShareShare
ReportReport
Posted on by 82
Hi Team,
 
I have a requirement, wherein when user is creating a sales order, after selecting the customer account on SalesCreateOrder form. When user enters the Customer requisition as soon as he enters the value in Customer requisition, he should receive a warning message stating ' Customer requisition already exists' (if in case its already exists with any other SO), then its up to user if he still wants to create SO or not.
 
Where should I write the code for this scenario wherein before saving or pressing any button itself warning should be thrown.
 
Please help.

 
  • rajborad Profile Picture
    rajborad 170 on at
    on which method should the warning be thrown for a field just entered the value on
    As you say, you want the warning message as soon as the value is entered or while entering, the system will check the validation on every character you enter in the "Customer requisition". 
    You can only validate after a tab or lose focus of that field.
    You can override the lostfocus or leave methods in the form field
     
  • Karuna Dogra Profile Picture
    Karuna Dogra 82 on at
    on which method should the warning be thrown for a field just entered the value on
    Hi Raj,
     
    Thank you for responding, if we write on onmodified then we have to either press tab or click anywhere on screen in order to get the warning message. But the question is, is it possible to get the warning message as soon as the value is entered in the field without clicking anywhere on the screen.
     
    Also, once warning is thrown the user must correct the value first to proceed further, how can I make it optional that it should just throw the warning and it should not stop the user to proceed further.
     
    Please help.
  • rajborad Profile Picture
    rajborad 170 on at
    on which method should the warning be thrown for a field just entered the value on
    Hi,
     
    You can write your logic to find the scenario and the warning message in onmodified method of the customer requisition field in form.
     

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,375 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans