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);

No comments:

Post a Comment

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...