Alfasith AX

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

Thursday, May 19, 2022

Get current record or select datasource of formDataSource extension of a form in D365

  Hi,

[ExtensionOf(formDataSourceStr(SalesTable, SalesLine))]

final class Dpay_SalesTable_SalesLine_FDS_Extension

{

        //init of SalesLineDS of SalesTable form

void initValue()

{

FormDataSource     formDataSource = this;


SalesLine    salesLine = formDataSource.cursor();

                

                //your logic        


next initValue();


//Your logic

}

}


Regards,


How to select the datasource of a form when you are the extension of formDatasource of another table in D365

 Hi,

[ExtensionOf(formDataSourceStr(SalesTable, SalesLine))]

final class Dpay_SalesTable_SalesLine_FDS_Extension

{

        //init of SalesLineDS of SalesTable form

void initValue()

{

FormDataSource     formDataSource = this;


SalesLine    salesLine = formDataSource.cursor();

SalesTable  salesTable = formDataSource .formRun().dataSource( formDataSourceStr( SalesTable, SalesTable)).cursor();

                

                //your logic        


next initValue();


//Your logic

}

}


Regards,



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...