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, ...
Suggested Answer

How to get particular values in the customer group lookup while creating customer

(0) ShareShare
ReportReport
Posted on by 1,010

Hi Team,

I want to show only few customer group while creating customer in customer group field. For same, I have extended custTable table and added a related field fixed relation in the custgroup field. but it is restricting me to insert data for other customer groups by entity.

So, I am thinking to create lookup in the customer group form control. but I am not able to find the control as it is dynamically created by below code in the DirPartyQuickCreateForm. 

private void addDynamicControls()
{
#DirParty
controlHeader = this.form().design(1).control(formcontrolstr(D, DynamicHeader));
controlHeader.dataSource(fbds.id());
controlHeader.dataGroup(#quickCreateHeader);
controlHeader.autoDataGroup(true);

controlDetails = this.form().design(1).control(formcontrolstr(DirPartyQuickCreateForm, DynamicDetail));
controlDetails.dataSource(fbds.id());
controlDetails.dataGroup(#quickCreateDetails);
controlDetails.autoDataGroup(true);
}

can anyone suggest how to show only few customer groups while creating customers ?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,053 Super User 2025 Season 2 on at

    Hi D.K.S.,

    Can you explain why you want to limit the choices? If some values are not allowed, why are they setup? Probably you can delete the customer groups? If they can't be deleted, please explain the business requirement. Are the valid choices the same for all users?

  • D.K.S. Profile Picture
    1,010 on at

    Hi Andre,

    Thanks for the reply.

    We have reserved few customer groups for CRM integration, those we don't want to use while customer creation from D365FO.

    Thats why we don't want to show them in the Lookup while creation customers.

    Can you please suggest how to achieve it ?

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

    Hi D.K.S.,

    Thanks for the additional details. This can be achieved by implementing security policies with help of the eXtensible Data Security (XDS) framework. There are some different variations possible.

    In case the users are not allowed to see the CRM reserved groups on the Customer groups form, you can create a policy on the customer groups to exclude some values or indicate which are allowed.

    This is, however not restricting a user for typing a value manually without using the lookup. To prevent the user from entering a wrong value on creating or modifying a customer, you would need to extend the field validation logic for an additional check.

    In case the user is not allowed to change any details on the customer record either, you can create a second policy where CUD operations will be restricted.

    You can learn more about XDS by reading the documentation or visit the blogs from Alex Meyer and me:

    dynamicspedia.com/.../xds

    alexdmeyer.com/.../

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
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans