Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Wednesday, May 10, 2023

Project resource with Role ID lookup in D365

 Hi,


               SysReferenceTableLookup     sysRefTableLookup;

        Query                       lookupQuery = new Query();

        QueryBuildDataSource        lookupQueryDataSource;

        QueryBuildDataSource        PSASchedRoleQueryDataSource;


        sysRefTableLookup = SysReferenceTableLookup::newParameters(tableNum(ResourceCategoryView), _formReferenceGroupControl);


        sysRefTableLookup.addLookupfield(fieldNum(ResourceCategoryView, CategoryId));

        sysRefTableLookup.addLookupfield(fieldNum(ResourceCategoryView, Name));


        lookupQueryDataSource = lookupQuery.addDataSource(tableNum(ResourceCategoryView));


        

        PSASchedRoleQueryDataSource = lookupQueryDataSource.addDataSource(tableNum(PSASchedRole));

        PSASchedRoleQueryDataSource.relations(false);

        PSASchedRoleQueryDataSource.joinMode(JoinMode::ExistsJoin);

        PSASchedRoleQueryDataSource.addLink(fieldNum(ResourceCategoryView, RecId), fieldNum(PSASchedRole, RecId));


Regards,

No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...