Friday, December 4, 2020

Validate in UI Builder class

 Write below code in your UIBuilder Class

public boolean validatePostingProfile(FormStringControl  _control)

{

    boolean        ret = true;

   VendPostingProfile    vendPostingProfile;

    vendPostingProfile  = _control.valueStr();  

    if(VendLedger::find(vendPostingProfile))

    {

        if(vendPostingProfile != ' ' )

        {

        error ('Posting profile does not exist');

        ret = false;

    }

    return ret;

}


call the above method in PostBuild  method


dlgpostingProfile.registerOverrideMethod(methodStr(FormStringControl, validate), methodStr(<yourUIBuilderclass>, validatePostingProfile),this);

Enable/Disable form control based on multiple rows select

 class PurchTableFormEventHandler {      [FormDataSourceEventHandler(formDataSourceStr(PurchTable, PurchTable), FormDataSourceEventType::Act...