Posts

Showing posts from May, 2022

Create lookup method for multiple datasource with no direct relation

 Today we have a requiremnt to create look up metho which shows the postion id on the bases of the job . but on the 2 table there is no direct relation so we can see how we join  1) create a look up method on table level. 2) create a lookup method and pass the refernce on datasource filed level. 1) create a look up method on table level. :-   static public void lookupPostionID(FormStringControl _formStringControl, str _jobID)     {                  Query                   query = new Query();         QueryBuildDataSource    qbds_HcmPostion;         QueryBuildDataSource    qbds_HcmPositionActionLine;         QueryBuildDataSource    qbds_HcmPositionActionDetail;         QueryBuildDataSource    qbds_Hcmjob;         QueryBuildRang...

Create a class to update the record and refresh the form

 Today we have a requriemnt that on form there is button. when user click on that button yes & no popoup will come and after that its will update the record and reresh form. We have done this using a call and attached that class in the action menu item set the enum property. class NGOfferLetterHeaderStatusChange {     NGOfferLetterHeader             offerLetterHeader;     NGOfferLetterApplicationStatus  offerLetterApplicationStatus;     public boolean dialog()     {         boolean ret = false;         if (Box::okCancel(strfmt("@SYS53061", offerLetterApplicationStatus), DialogButton::Ok, "@SYS31424") == DialogButton::Ok)         {             ret = true;         }         return ret;     }     protected void new(NGOfferLetterHeader _offerLetterHeader, ...

To filter second datasource on enum value in execute query method of first data source

 Hi all , We have a requirement to filter the data source on execute query on the bses of enum value. [ExtensionOf(formDataSourceStr(HcmWorkerActionDetail,HcmActionState))] Final class NGHcmWorkerActionDetailFrm_HcmActionStateDS_Extension {     public void executeQuery()     {         QueryBuildDataSource  qbds;         QueryRun              queryRun;         HcmActionTypeSetup    HcmActionTypeSetuploc;         if(element.args().menuItemName() == menuItemDisplayStr(NGHcmWorkerActionListTransferWorker))         {             query q = new Query();                      qbds = q.addDataSource(tableNum(HcmActionTypeSetup));             qbds.addRange(fieldnum(HcmActionTypeSetup,ActionType)).value(enum2Str(H...