Friday, April 24, 2020

Parameter display order in report dialog in Dynamics 365 for finance and operations

If you want to put data contract parameters/dialog in an order, you just need to add SysOperationDisplayOrderAttribute attribute to the parm method.

Below is the code snippet.

[DataMemberAttribute, SysOperationDisplayOrderAttribute("2")]
public str parmDocNum(str _docNum = docNum)
{
       docNum = _docNum;
       return docNum;
}

[DataMemberAttribute,SysOperationDisplayOrderAttribute("3")]
public str parmDocVersion(str _docVersion = docVersion)
{
       docVersion = _docVersion;
       return docVersion;
}

Hide parameters in report dialog in D365 FO | Dynamics 365 for finance and operations | D365 F&O

Sometime we get requirement to hide contract parameters either in SSRS reports or SysOperation.

To achieve the same, you need to add SysOperationControlVisibilityAttribute attribute to the parm method of contract class.
Below is the code snippet.

[DataMemberAttribute,SysOperationControlVisibilityAttribute(false)]
 public TableId parmTableId(TableId _tableId = tableId)
 {
     tableId = _tableId;
     return tableId;
 }