Thursday, July 13, 2023

Disable Main account

 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

adding new node in hierarcy type in workflow

class: WorkflowHierarchyProviderHelper  for convert nodetype  [ExtensionOf(classstr(WorkflowHierarchyProviderHelper))] public  final class ...