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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Show Branch and RespCenter segment entry on a custom form.

(1) ShareShare
ReportReport
Posted on by 1,215

Hi,

Greeting of the day!

I want to show only the Branch and RespCenter segments of the dimensions of a purchase requisition line on a custom form,

as lookup entry fields.

Could we control that on a dimension entry control? Or, is there any other better way?

With best regards,

Abhinay

I have the same question (0)
  • Michal Krejza Profile Picture
    on at

    Hi Abhinay,

    Could you please explain the requirement in other words ? I have tried to understand what ytou are trying to achieve, but I am still not sure. 

    Thank you,

    Michal 

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Michal,

    Thank you for your reply.

    In a dimension entry control we get all the segments listed one below the other, a user can edit, enter or choose from the lookup of values. I want the similar entry fields, except for the control on the visibility of the segments. So, in my case, I want to allow the user only to edit the segments Branch and RespCenter only. Other segments would not be visible.

    Dimrnsions.png

    Please let me know, should you need more information.

    With best regards,

    Abhinay

  • André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 Season 2 on at

    Hi Abhinay,

    If you want to hide or block some of the controls in the screenshot you shared, it would be a cumbersome customization as the controls are added dynamically. You have to hook in or create your own form handler to show these fields. Anyhow, it is a customization to achieve it.

  • Sukrut Parab Profile Picture
    71,710 Moderator on at

    As Andre mentioned its going to be a customization . I would recommend, instead of messing around with segmented entry control create separate look ups where user can select values and then you can use those values to create dimeniosn.  

  • Rahul Mohta Profile Picture
    21,032 on at

    implement a process rather than dynamically showing /hiding control

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi André,

    Thank you for your reply I was wondering whether deprecated DimensionLinkProvider is replaced by something else?

    //BR, Abhinay

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Sukrut,

    Thank you for your reply. Exactly, I do not want to change any code of the dimension control. I was wondering whether deprecated DimensionLinkProvider is replaced by something else?

    //BR, Abhinay

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Rahul,

    Thank you for your reply.

    Is there any existing example that you are aware of?

    //BR, Abhinay

  • Suggested answer
    Abhinay Tharwal Profile Picture
    1,215 on at

    Hi,

    As shown in this example, we can control whether the segments would be editable.

    But to control their visibility dimControl.parmDisplayedDimensionSet(dimensionAttributeSetStorage.save()); could be used.

    //BR, Abhinay

  • Verified answer
    Abhinay Tharwal Profile Picture
    1,215 on at

    [FormEventHandler(formStr(SalesTable), FormEventType:Initialized)]
    public static void SalesTable_OnInitialized(xFormRun _sender, FormEventArgs _e)
    {
        DimensionEntryControl dimControl = _sender.design().controlName(identifierStr(DimensionEntryControlTable));
        DimensionEnumeration dimensionSetId = DimensionCache:getDimensionAttributeSetForLedger();
        DimensionAttributeSetStorage dimensionAttributeSetStorage;
        DimensionAttribute dimensionAttribute;
        DimensionAttributeSetItem dimAttrSetItem;
    
        const str contractNumber = 'ContractNo';
        const str contractType = 'ContractType';
    
        dimensionAttributeSetStorage = new DimensionAttributeSetStorage();
    
        while select dimensionAttribute
            where dimensionAttribute.Name != contractNumber // Exclude specific dimension which should be not editable
                && dimensionAttribute.Name != contractType // Exclude specific dimension which should be not editable
            join dimAttrSetItem
                where dimAttrSetItem.DimensionAttribute == dimensionAttribute.RecId
                    && dimAttrSetItem.DimensionAttributeSet == dimensionSetId
        {
            dimensionAttributeSetStorage.addItem(
                dimensionAttribute.RecId,
                dimensionAttribute.HashKey,
                NoYes::Yes);
        }
    
        dimControl.parmEditableDimensionSet(dimensionAttributeSetStorage.save());
        dimControl.parmDisplayedDimensionSet(dimensionAttributeSetStorage.save());
    }

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans