web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Auto populate Segmented Entry Control from customer default dimension.

(0) ShareShare
ReportReport
Posted on by 15

Hi Guys, 

I am using the segmented entry control on my custom form which is working fine, Now I want to Auto populate dimensions from the customer default dimension when the user selects the Main account in control.

which method to override? Or how to populate the other dimension from the customer when the main account is Changed.

I have the same question (0)
  • Suggested answer
    Pedro Tornich Profile Picture
    955 on at

    Hi Kiran,

    To achieve this you will need to merge the current record LedgerDimension with the customer DefaultDimension right after the Main Account is modified.

    To handle the Main Account modification event you will need to override the onSegmentChanged() method on your segmented entry control.

    Here is a sample code:

    [Form]
    public class MyForm extends FormRun
    {
        DimensionAttributeRecId mainAccountDimAttr;
        
        public void init()
        {
            mainAccountDimAttr = DimensionAttribute::getWellKnownDimensionAttribute(DimensionAttributeType::MainAccount);
            
            super();
        }
        
        [Control("SegmentedEntry")]
        class Record_AccountNum
        {
            public void onSegmentChanged(DimensionControlSegment _segment)
            {
                super(_segment);
                
                if (_segment.parmDimensionAttribute().RecId == mainAccountDimAttr)
                {
                    record.LedgerDimension = DimensionDefaultingService::serviceCreateLedgerDimension(record.LedgerDimension, record.custTable().DefaultDimension);
                }
            }
        }
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 628 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 501 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 437

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans