Extension of a Form Datasource - Chain of command- D365 F&O - X++ Code

Rumman Ansari   Software Engineer   2023-10-27 00:00:00   307  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

COC for Form Datasource



[ExtensionOf(formDatasourcestr(SalesTableListPage,SalesTable))]
final class TM_SalesTable_DataSource_Extension
{
    public int active()
    {
        int ret = next active();  
        SalesTable SalesTable_ds = this.cursor();
        if(SalesTable_ds.SalesStatus == SalesStatus::Invoiced)
        {
            this.formRun().design().controlName(formControlStr(SalesTableListPage,FormButtonControl1)).enabled(true);
        }
        else
        {
            this.formRun().design().controlName(formControlStr(SalesTableListPage,FormButtonControl1)).enabled(false);
        }

        return  ret;
    }
}
MCQ Available

There are 1 MCQs available for this topic.

1 MCQ