Notifications
Announcements
No record found.
I want a particular condition to be not checked in validate write.I cant delete it so what method approach i can choose.please guide me.
You can't remove standard code. But you can always change the return value of methods, such as validateWrite. Be careful to not allow users to enter data that would break the standard functionalities. Remember that the standard functionalities trust that the data is complying with the standard validations.
Normally you should use extensions to extend the solution = add your own features. Trying to remove standard features can lead to issues. Therefore I suggest that you share your actual scenario and business requirement with us, so that we can provide suggestions to you.
In validate write there is an if condition with checkfailed .My requirement is i want to skip that if condition.how can i achieve this or is there any other means of doing this so it should not throw an error. Table is Markup Table.In validate write there is an if condition as-
if (this.VendType == MarkupType::LedgerAccount && this.CustType == MarkupType::Item && this.TaxItemGroup) { ok = checkFailed("@SYS26238"); }
moved to the d365 forum
As I already wrote: "I suggest that you share your actual scenario and business requirement with us, so that we can provide suggestions to you."
So, what check is it? What table is it? Why do you want to bypass the check?
Hi sharudas,
I would suggest you one solution. But it is about updating the record in the table.
* After you added the extension class, inside the CoC method first you've to update your table record before calling next(), to make your condition false. Then
* After calling next() you can update your record again as per your requirement.
## By doing this you can avoid the execution of your IF condition.
Hi Sharudas,
Duplicate thread:
community.dynamics.com/.../alternatives-for-removing-a-part-of-code-from-validate-write-d365fo-x
Answer in that thread: Your requirement is disobeying with the extension design. we cannot by pass this if condition.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader