Skip to main content

Posts

Showing posts with the label counter

How to Update Project Status by Code in Ax 2012

To Update Project Status by Code in Ax 2012 You can get help from below code sample. In this code if Project status is created then it will update to In process stage. Same way you can try as per your requirement. Projtable projTable; int cnt; ttsBegin; while select forUpdate projtable where projTable.Status==ProjStatus::Created { cnt++; projtable.Status=ProjStatus::InProcess; projtable.update(); } ttsCommit; info(strFmt("%1 Project Updated",cnt));

How to invisible formpart in Ax 2012

To invisible formpart in Ax 2012 you can try below code in Job. PartList partList; Counter partCnt; FormRun FormRun_part; NumberOf NoOfParts; super(); partList1 =new PartList(element); NoOfParts =partList1.partCount(); for (partCnt =1; partCnt <= NoOfParts; partCnt++) { FormRun_part =partList1.getPartById(partCnt); if (FormRun_part.name() ==formStr(YourFormName)) { FormRun_part.design().controlName("YourControlName").visible(false); } }