This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
12 January 2018
SYSOperation frame work and example and usage in AX 2012 and D365 opertions
Sys Operation frame work is uses the MVC(Model view control) and enable the option in to expose the method using SysentryPointAtrribute[True], SysOperationFrame work is using in , SSRS contract to get input from user, Custom services, and batch job
SysEntryPoint[] is absolute in D365 and explain how the sysOperation works in the following:
How this work:
Base classes:
SysOperationServiceController // This base class extends to the Controller class
SysOperationDataContractBase // This base class extends to the Contract class.
SysOperationAutomaticUIBuilder // This base class extends to the UI Builder class
public static void main(Args _args)
{
ConWHSVehicleGroupChangeController controller;
controller = new ConWHSVehicleGroupChangeController(
classStr(ConWHSVehicleGroupChange),
methodStr(ConWHSVehicleGroupChange,
Run),
SysOperationExecutionMode::Synchronous);
controller.startOperation();
}
==
public static void main(Args _args)
{
ConWHSVehicleGroupChangeController controller;
ConWHSVehicleTable vehicle;
switch (_args.dataset())
{
case tableNum(ConWHSVehicleTable):
vehicle = _args.record();
break;
}
if(vehicle.RecId == 0)
{
//Active buffer required.
throw error ("@SYS25821");
}
controller = new ConWHSVehicleGroupChangeController(
classStr(ConWHSVehicleGroupChange),
methodStr(ConWHSVehicleGroupChange,
Run),
SysOperationExecutionMode::Synchronous);
ConWHSVehicleGroupChangeContract contract;
contract = controller.getDataContractObject('_contract');
if(!contract)
{
//Function %1 was called with an invalid value
throw error (
strFmt("@SYS23264",
classStr(ConWHSVehicleGroupChangeController)));
}
contract.VehicleGroupId(vehicle.VehicleGroupId);
contract.VehicleId(vehicle.VehicleId);
controller.startOperation();
if(FormDataUtil::isFormDataSource(vehicle))
{
//This will call the table's data source's research
// method to refresh the data from the table.
// The true parameter will keep the current record
FormDataUtil::getFormDataSource(vehicle).research(true);
}
}
Subscribe to:
Post Comments (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...
Amazing Article ! I have bookmarked this article page as i received good information from this. All the best for the upcoming articles. I will be waiting for your new articles. Thank You ! Kindly Visit Us @ Coimbatore Travels | Ooty Travels | Coimbatore Airport Taxi | Coimbatore taxi | Coimbatore Taxi
ReplyDelete