Pages

Wednesday, November 30, 2011

Hiding a data member attribute from dialogs

When you use data contracts with for example the new Business Oprations Framework (BOF), it is smart that AX will generate the dialog for you. But what if you have a field in the data contract that you don't want exposed in the dialog?

Well, use the SysOperationControlVisibilityAttribute:
[DataMemberAttribute, SysOperationControlVisibilityAttribute(false)]
public int parmIntProperty(int _parmIntProperty = parmIntProperty)
{
    parmIntProperty = _parmIntProperty;

    return parmIntProperty;
}