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

Data entity import failing

(0) ShareShare
ReportReport
Posted on by 29
I've created a data entity that joins the CustVendPDCRegister and LedgerJournalTrans tables. My goal is to update records in the CustVendPDCRegister table without modifying the LedgerJournalTrans table. To avoid errors during the update, even though I'm not changing any fields in LedgerJournalTrans, I added code in the mapEntityToDataSource method to set SkipValidateWrite on LedgerJournalTrans. However, this has resulted in the update operation being skipped entirely for both tables. When I debugged, I noticed that the saveEntityToDataSource method is returning false, preventing the operation from proceeding to the CustVendPDCRegister data source. Can anyone help me identify what might be going wrong?
 
 
public class SCCustVendPDCRegisterEntityLedgerJournalTransEntity extends common
{
    /// <summary>
    ///
    /// </summary>
    /// <param name = "_entityCtx"></param>
    /// <param name = "_dataSourceCtx"></param>
    public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
    {
        if (_dataSourceCtx.name() == dataEntityDataSourceStr(SCCustVendPDCRegisterEntityLedgerJournalTransEntity, LedgerJournalTrans))
        {
            this.skipDataSourceValidateWrite(true);
            _dataSourceCtx.setDatabaseOperation(DataEntityDatabaseOperation::None);
        }
       
        super(_entityCtx, _dataSourceCtx);
    }
}
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,022 Most Valuable Professional on at
    If you don't want to update LedgerJournalTrans, you should set this entity data source as read-only.
  • Suggested answer
    Vahid Ghafarpour Profile Picture
    12,228 Super User 2026 Season 1 on at
    I'd consider an alternative method to update CustVendPDCRegister without affecting LedgerJournalTrans. For example, handle the update logic separately or use a different method to bypass the validation for LedgerJournalTrans.

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
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans