How to customize segmented entry control

 Customizing Segmented entry Lookup in out of the box form

When you have a requirement to customize the lookup in ledger dimension segmented entry, following are the steps needed to perform to achieve this requirement.

Step 1:
Create field account type that contains multiple accounts like Customer, Vendor, Bank etc.
Create field account number that will save the account number related to account type selected. for account number take EDT ledger dimension that would save the RecId of account number.



Step 2: 
Now paste your field along with account type in extension of out of the box form. And set the following properties of segmented control with auto declaration set to yes.


Step 3: 
Create a class to extend from dimension hierarchy class.


Step 4: 
Create condition based on your account type.
Step 5: 
Create extension class of SegmentedEntryControl class.
Step 6: 
Override the checkUseCutomLookup method. and specify for what account types custom lookup is required. In this case, only for customer and vendor, custom lookup is required so returned true for these two and false for General Ledger.
Step 7: 
Override lookup method of segmented entry in form init method.


Step 8: 
Now create and extension of CustTableLookup form and override init and executeQuery for your account type.
Step 9: 
Do the same for VendTableLookup form

Comments

Popular posts from this blog

Integration from azure blob through x++

Change tracking through AIFChangeTrackingTable in X++