You can apply customized arguments as range parameters to a data export from D365 FO.

Custom code

You develop a range parameter as an argument. To do so, add the desired method with its argument to the BisDialogBase class.
The method must be defined in this way: dialogBase.setFieldValue('[argument]', [code to define the argument value]).

Document

You can apply the argument as range parameter to the source document if is a D365 FO document. To do so, add a range of type Parameter to the desired document record. Usually, this is the root record. In the Range field, enter the exact argument name. 
Make sure, each argument that you use in a document is unique for the document.

Example

You want to add these parameters to the document record range: 
  • company: Used to get and set the current company.
  • origCompanyId: Used to get and set the original company.
The BisDialogBase class has this code:
 
dialogBase = new BisDialogBase();
dialogBase.setFieldValue('company', companyRule.Company);
dialogBase.setFieldValue('origCompanyId', companyRule.getOriginalCompany().CompanyId);
mArgs.packedBisDialogBase(dialogBase.pack());

 
Add the parameters to the document record range:
Note: If you run a message from code, you can apply these parameters as well.

See also

Provide feedback