Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

dual-write custom creation filtering of standard entity

(0) ShareShare
ReportReport
Posted on by 768

Hello,

I have a standard dual-write entity "cds sales order headers". Underlying entity in AOT is SalesOrderHeaderCDSEntity

I need only those newly created  SalesOrders in FO to be created in CE that have SalesOrderOriginCode equal to those values pointed out in the parameters of "Accounts receivable" module.

Simple dual-write filtering described here

docs.microsoft.com/.../customizing-mappings

isn't sutable for me as I see it. My scenario is more difficult.  So I believe I should do that via code in some method of dataentity. Or I'm wrong and complex filtering can be done in dual-write UI?

If via code s what's the best dataentity method for that? InsertEntityDataSource()? 

Thanks.

  • dark_knight Profile Picture
    dark_knight 768 on at
    RE: dual-write custom creation filtering of standard entity

    Hi,

    I have dual-write set up. SalesOrders are synchronized by means of the stdnard dual-write data entity below:

    pastedimage1651255036460v1.png

    there is a standard mapping for salesorigincode field

    pastedimage1651255137936v2.png

    I need only those SalesOrders to be synchronized from FO to CE that particular value of salesorigincode(SalesTable.SalesOriginID). Those particular values are pointed out in CustParameters. Therefore I need to fetch them by code like SalesParameters salesParameters = SalesParameters::find();

    I can't use this standard filter of dual write (fix if I'm wrong) as far as I get it because it works only for simple constant values. I can't write there any X++ code indeed

    pastedimage1651255353465v3.png

    therefore I think I should create a computed column returning boolean value depending on the value of salesorigincode and then use this value in the filter of dual write here

    pastedimage1651255353465v3.png

    Is it a correct approach?

    Thanks

  • huijij Profile Picture
    huijij 19,811 on at
    RE: dual-write custom creation filtering of standard entity

    Hi Azat,

    Would you specify what are your business requirements?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans