in my scenario where I need to lock the main account .user should not be able to Enter the value in account distribution.
below code works
[FormEventHandler(formStr(AccountingDistribution), FormEventType::Initialized), SuppressBPWarning('BPParameterNotUsed', "Parameter not required")]
public static void AccountingDistribution_OnInitialized(xFormRun sender, FormEventArgs e)
{
const str segmentedControl = 'Distribution_LedgerDimension';
SegmentedEntryControl dimControl = sender.design().controlName(segmentedControl);
dimControl.parmLockMainAccountSegment(true);
}
No comments:
Post a Comment