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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Dual Write Sync Helper Class X++

(2) ShareShare
ReportReport
Posted on by 177
I am trying to use the DualWriteSyncHelper::forceSyncRecordsToCDS class method to create a record in sales via the Shared Product details and Global products maps.  Can this method be used to create a missing record?  In Dataverse, environment, system jobs, I can see the message marked successful.  It comes in as a PATCH.  In the Dual Write Error log, the execution status is 1.  I cannot find any reason within the log for the failure.  The mapping is correct and works as an UPSERT when manual records are created or updated in D365 Finance.  
 
Am I using this class correctly?  
 
public class SII_inventTable_CPQStaging extends common //custom table
{
public void dualWriteSync_Item()
{
    EcoResEveryProductEntity    productEntity;
    EcoResReleasedProductCreationV2Entity   itemEntity;
    List    itemList = new List(Types::Record);
    List    productList = new List(Types::Record);
    while select productEntity where productEntity.ProductNumber == this.ItemId
    {
        productList.addEnd(productEntity);
        
    }
    while select itemEntity where itemEntity.ItemNumber == this.ItemId
    {
        itemList.addEnd(itemEntity);
    }

    DualWriteSyncHelper::forceSyncRecordsToCDS(productList);
    DualWriteSyncHelper::forceSyncRecordsToCDS(itemList);
}
}
 
Thanks!
 
Categories:
I have the same question (0)
  • Suggested answer
    lispyj Profile Picture
    177 on at
    Dual Write Sync Helper Class X++
    Funny how things become clearer when you write them down.  When I pasted in my code, I discovered that the name of the entity used for Shared Product details does not equal the map we are running!  
     
    My global product map worked as expected!!  I will correct the item map, but this method does seem to work to sync a single item.
     
    Thanks for your attention!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 796

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 721 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 530 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans