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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to write custom validations on standard edit methods on a form

(0) ShareShare
ReportReport
Posted on by 115

Hi all! 

I have an requirement to write validations on modifying an edit method field in the "All favorites" form under PMA --> Setup --> Timesheets. 

This edit method validates the activity number given by the user and populates the data into the Activity number field of the data source of the form. 

My requirement is to perform a validation on modifying the edit method field. The validation works for the activity number if we create a record with legal entity as current company. But I was not able to do validation if I select a different legal entity(Eg.USRT)  for the record under the current company(USMF). 

Things that I tried so far and didn't work: 

  1) Taking COC for validate field of the table and called the validate field under on modifying event of the form string control. On this occasion the standard error for table relation strikes as the system checks the value of selected activity number of a different legal entity with the Activities table of the current legal entity. 

  2) On validating and On validated write events of the string control (As the string control does not have the selected string value when being hit)

Appreciate any inputs on it. 

I have the same question (0)
  • Verified answer
    huijij Profile Picture
    19,811 on at

    Hi JohnBright,

    The data input by the user is usually best validated in the validateWrite() method of the table or Data Source. But the validating can also be added to an edit method. Did you try this way?

  • JohnBright Profile Picture
    115 on at

    Hi Judy,thanks for your response. 

    Yeah I took COC for the edit method and it worked. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 510 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans