I’m having an issue with AX2012.
I’m making process using SysOperation Framework as follows.
selecte multiple line on a form.
clicke button to process.
show dialog then input some criteria and click ok button.
startOperation in inherited SysOperationServiceController.
main process in inherited SysOperationServiceBase.
here, I want to process with only selecting line number of times.
I thought, it’s ok to using MultiSelectionHelper. But I couldn’t pass the args.caller().
First, I put the parmCaller() on Contract class. But It couldn’t get any value on Service Class.
It doesn’t seems get value if it doesn’t add DataMemberAttribute on method. So I added it on method.
But error occurd while execute.
Second I struggled to add Args on Service class, but error occured.
Does Anyone know how to pass the Args.Caller from Controller class to Service class?
Is it possible?
You can call args.caller() in main() method of the controller class (or pass args to another method and do it there, of course). Then fill the data contract, where you can use either primitive types or other data contracts. Forms clearly don’t belong to either category, therefore you have to extract data and put them to the data contract already in the controller.
As I already tried to explain, FormRun can’t be used in data contracts. Please refer to Using Data Contracts in X++ [AX 2012] for details about types you can use.