Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Customizable default value for a field

(0) ShareShare
ReportReport
Posted on by 20

Hello,

I'm looking for the way to allow specified user to set default value for a lookup field, it should be accessible from form view so it can be easily changed. Is it even possible? 

I thought about some workflow, but could it be customized by user?

Thank you for any help,

Henryk

  • Verified answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,482 Super User 2025 Season 1 on at
    RE: Customizable default value for a field

    Yes. You can set the default values.

    But for all required entities(new/old) you need to register the script on forms.

    and to set lookup please refer below screenshot:
    pastedimage1631002586312v1.png

    reference link:
    https://carldesouza.com/how-to-set-a-lookup-field-to-another-lookup-field-on-a-dynamics-365-power-apps-form-using-javascript/

    Thanks,
    Pradeep.

  • Henryk Kosse Profile Picture
    Henryk Kosse 20 on at
    RE: Customizable default value for a field

    But can i set this value as default for all new entities?

  • Verified answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,482 Super User 2025 Season 1 on at
    RE: Customizable default value for a field

    Hi,

    Instead of Workflow, you can use the CRM based script as follow:

    1. By default lock the lookup field on form.

    2. Create one security role. For e.g. "Default Lookup Role"

    3. Now in script we can access the security role of the user as shown below:

    pastedimage1630944932408v1.png

    link https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility/getglobalcontext/usersettings

    4. If user has "Default Lookup Role" then unlock the field.

    5.Else lock the field.

    Same thing we can achieve using Team.

    1. Create Team and all required user in it.

    2. After this get the team name if user is part of New team then lock/unlock the same lookup field.


    Thanks,
    Pradeep.

    Please mark this as VERIFIED if it helps.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans