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 :
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

I have the same question (0)
  • Verified answer
    Pradeep Rai Profile Picture
    5,489 Moderator on at

    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.

  • Henryk Kosse Profile Picture
    20 on at

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

  • Verified answer
    Pradeep Rai Profile Picture
    5,489 Moderator on at

    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.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans