Monday, November 25, 2024

Use Chain Of Command with Examples

 Dear Friends

Here is an example of using Chain of Command for form datasource methods.

[ExtensionOf(formDataSourceStr(<<Form Name>>, <<Datasource Name>>))]

final class FormName_DataSourceName_ModelName_Extension

{

    public int active()

    {

        int ret ;

        ret = next Active();

        // Get current selected record.

        TableName Buffer = this.cursor();

        FormButtonGroupControl ControlObject; 

        ControlObject= this.formrun().design().controlName(formControlStr(<<FormName>>, <<ControlName>>)) as FormButtonGroupControl; //Initialized the Form control

// Validation logic

if(InventTransArchiveProcessHistoryTable.IsCustomProcess == NoYes::Yes)

        {

             ControlObject.visible(false);

        }

        else

        {

            ControlObject.visible(True);

        }

        return ret;

    }

}


Happy Daxing...

Use Chain Of Command with Examples

 Dear Friends Here is an example of using Chain of Command for form datasource methods. [ExtensionOf(formDataSourceStr(<<Form Name>...