Hi,
Below is the code for hiding a form control in AX. In this example I'm hiding map button.
class LogisticsPostalAddressGrid_Eventhandler
{
/// <summary>
///
/// </summary>
/// <param name="args"></param>
[PostHandlerFor(formStr(LogisticsPostalAddressGrid), formMethodStr(LogisticsPostalAddressGrid, init))]
public static void LogisticsPostalAddressGrid_Post_init(XppPrePostArgs args)
{
FormRun element = Args.getThis(); //form element
FormControl myNewButton = element.design(0).controlName("MapButton");
myNewButton.visible(false);
}
}
No comments:
Post a Comment