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;
}

4 comments:

Ruby Claire said...

It was nice reading the contents of this blog.


Inventory forms

BRAHMA REDDY said...

Hi after using this statement ,still I am getting the parameter in dialog.Can you please help me ..?

But in my contract I am using UI Builder class

KevinY said...

HI,

It doesn't work on BOF...

bloggier said...

On report contracts, you can change the parameter property visibility to "hidden" on visual studio. You can also control the parameter from there.

Hope it helps.