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, ...
Suggested Answer

How to prevent the updation of a record without throwing any error.

(0) ShareShare
ReportReport
Posted on by

I just wanna prevent the updation of record on the basis of a specific condition without showing any error or warning to user.

Let me explain with an example:

while importing entity we have multiple records which we wanna update. Let's on the second record my condition meets, system should ignore the updation of this record and just skip to next record.

Same like in the loops we use continue keyword to skip the iteration.

I tried this method but it is not working, actually debugger is not hitting in this method.

0876.pastedimage1656210463829v1.png

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    Validations are usually implemented in validateWrite() method.

    Which version of AX are you using?

  • Ahmad Hassan Profile Picture
    on at

    Yes, you are right we usually write validation on validateWrite() method which throws error if we return false.

    In my case I don't wanna throw error because it will stop the processing of other records while importing entity.

    I just wanna bypass the specific record.

    I'm using Dynamics 365.

    Thanks.

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    Moved to Dynamics 365 Finance Forum.

    I assume you're talking about a file import through document management.

    Please clarify whether you want to change the behavior just for your condition, or for all validation errors.

  • Ahmad Hassan Profile Picture
    on at

    I'm talking about the file import through Data Management framework. I want to change the behavior for my specific condition(e.g: I've a status field. If the status = "A", while importing entity system will not perform any updation against this record and will move to next record).

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    It's clear that you want it for your condition - the question is whether it should apply also to all other validations or not.

  • Ahmad Hassan Profile Picture
    on at

    no, just for my condition. Like I explained.

    Lets I'm importing 10 records,  3 records have status = 'A'. Then it should only update the other 7 records and should ignore 3 records which have status = 'A'.

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    You're again explaing your condition, which isn't what the question is about.

    If it's just about your condition, does it mean that you explicitly want all lines to be reject if some other validation fail? Please confirm.

  • Ahmad Hassan Profile Picture
    on at

    yes, If other validation failed system can reject all the lines. I've no concern with it.

  • Suggested answer
    Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    If you have no specific requirements, it's better to deal with all validations in the same way.

    The good news is that what you want is the standard behaviour. Let me show you an example. I import two customer groups, one correct and one with a data issue - validateWrite() returns false for the other one.

    When I import the file, one customer group is created in F&O and one is left in the staging table with an error.pastedimage1656399065480v1.png

    pastedimage1656399152123v2.png

    As you see, correct records are imported and invalid are skipped, as you want.

  • Ahmad Hassan Profile Picture
    on at

    But I don't wanna show any error to user. The requirement is to just skip the record.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 265 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 215

#3
Subra Profile Picture

Subra 177 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans