Jika kita membuat suatu Form terutama DropDialog yang diperuntukan untuk
mengentry data, terkadang sukar sekali untuk merefresh form induknya
supaya memperlihatkan hasil entry kita.
berikut adalah contoh untuk merefresh datasource induk.
Di form Childnya (DropDialog) ...
Buka node method
di method CloseOK()
tambahkan macro #Task
public void closeOk()
{
#Task
FormRun formRun;
super();
formrun = element.args().caller();
if(formrun)
{
formrun.task(#taskF5);
}
}
implementasinya bisa speerti ini :
public void closeOk()
{
#Task
FormRun formRun;
RefRecId custRecId = element.args().record().RecId;
RefRecId caseRecId;
Inventtable ITinventtable;
ITinventtable.InventId = FieldInventId.valueStr();
ITinventtable.Name = FieldInventname.valueStr();
ITinventtable.insert();
formrun = element.args().caller();
formrun.task(#taskF5);
if(formHasMethod(element.args().caller(), identifierstr('setTouched')))
{
element.args().caller().setTouched();
}
super();
element.savelastvalues();
}
private void saveLastValues()
{
xSysLastValue::putValue([FieldInventId.valueStr()], curext(), curuserid(), UtilElementType::Form, form.name());
}
All Archives in this blog may be used for the Junior,Dummies or someone who just started for career at Dynamics Ax ... A Place Where U can Start ur Code - right here ...
Langganan:
Posting Komentar (Atom)
Erorr CS1963 - An expression tree may not contain a dynamic operation.
Kali ini saya mendapatkan erorr dengan code CS1963, padahal sebelumnya saya sudah mendefinisikan 'var item in Model' di @foreach(var...
-
My code here is to copy Purchase Agreement line from reference Purchase Agreement to new Purchase Agreement. static void PSMCopydirecttoag...
-
If you want to try custom your notification, AX Standard can bring the user to the form where the information exist but when the form was...
-
"Error while setting server report parameters. Error Message: The item ´/DynamicsAx/PurchPurchaseOrderreport.Report4´ cannot be found ...
Tidak ada komentar:
Posting Komentar