Skip to main content

Notifications

Community site session details

Community site session details

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

[TrvCreditCardTransactionEntity] custom data entity Import - field validation bypass

(2) ShareShare
ReportReport
Posted on by 48
Hi All,
 
I have created a custom[duplicated from standard] data entity based on TrvCreditCardTransactionEntity to import credit card transactions.
 
Data entity using: Incremental push
 
During the import process, for existing records [Duplicate records] there are standard field validations happening in Class DmfEntityWriter-> processRecords().
 
I have to bypass the standard validation and set custom validation with a info message.
 
However, I could not bypass the standard validations. I have tried to skip the validation using the below code in persistEntity() method, also tried in initializeEntityDataSource() method. As I understand all the validation happens before data being inserted from Staging to Target. Hence none of the method hits during execution. 
 
this.skipDataSourceValidateField(fieldnum(*******, ****), true);
 
Is there any other way I can skip the standard validation of fields and execute custom validation as required.
 
 
Error message:
Results. update not allowed for field 'Card ID(CardNumber)'
Results. Validation of field 'Transaction date' failed
Results. Validations failed
  • CU29070522-1 Profile Picture
    48 on at
    [TrvCreditCardTransactionEntity] custom data entity Import - field validation bypass
    Hi All,
    Resolution:
    Entity level: 'CardNumber' field AllowEdit and AllowEditOnCreate set to Yes.
    This bypassed the standard field validation on CardNumber and custom validation executed as expected. 
  • CU29070522-1 Profile Picture
    48 on at
    [TrvCreditCardTransactionEntity] custom data entity Import - field validation bypass
    @André Arnaud de Calavon - Thank you for response. Below is the business case.
     
    Standard entity -If an credit card statement file imported with duplicates, the import will error out in the duplicate record and stops importing rest of the records (new) in file. Hence we decided to create custom data entity which should skip duplicate record update and insert the new records.
     
    Custom entity - Custom entity is created and now the process skips the duplicate record and import the new record properly. However when duplicate record being processed, there is a standard Field Validation executing in DmfEntityWriter-> processRecords() and provides the above error message. The execution stops there for duplicate record and picks the new record for processing. Our business case is to bypass this field validation and provide a custom validation with a custom info message['Record already exist'] for duplicate records. 
     
    Note: The scenario is not trying to allow duplicate record. We want to provide a different validation bypassing the standard validation of field. 
  • André Arnaud de Calavon Profile Picture
    294,095 Super User 2025 Season 1 on at
    [TrvCreditCardTransactionEntity] custom data entity Import - field validation bypass
    Hi,
     
    Can you please clarify at what moment and for what reason you want to allow for duplicates? DMFEntityWriter is a core component which should not be overridden. If you can elaborate on the business requirement, we can try to help you with an alternate solution. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans