AX 2009, AX 2012, Development, dialog, Dynamics AX, User parameters, without dialogable class, without runbasebatch

Quick Dialog to take user entered parameters without dilaogable class creation

Following job uses dialog class to take parameters from user and run the job

static void UserParamSample(Args _args)
{

wmslocationID     wmslocationID;

str                           palletstoRAF;

dialog          dlg = new dialog();

 dialogField     dlgPalletIDs,dlgwmslocation;

 dlgPalletIDs = dlg.addField(typeid(ItemFreeTxt),”Container number”,”Enter pallet Ids seperated by commas”);
dlgwmslocation = dlg.addField(typeid(wmslocationid),”Location”);

if(!dlg.run())

return;

else

{

palletstoRAF = dlgPalletIDs.value();

wmslocationid = dlgwmslocation.value();

//Run the Job

  }

}

Standard