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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to change value of a form field to the user?

(0) ShareShare
ReportReport
Posted on by 190

I have a form and one of the fields is the requestor.  On form load, I want that field to be populated with user's name.  I have a custom user table that contains the users of the app.  So I prefer to search in this table to get the name.  I understand that this can be done with javascript.  Can someone provide some resources for doing this?  Thanks.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi bp3378,

    Yes, you could use JS to achieve this. Please follow the step:

    1. Create an onload event on your form. Reference: Dynamics CRM JavaScript OnSave and OnLoad - Carl de Souza

    2. Use retrieveMultipleRecords() method to retrieve your custom user table in your JS and then set the user lookup field. 

    Reference:

    https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrievemultiplerecords

    Set and Retrieve a Lookup Id and Value using Xrm.WebApi - Carl de Souza

  • bp3378 Profile Picture
    190 on at

    thanks!

    This should be very helpful i'll take a look.  

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 48 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 41

#3
Ayesha Wajahat Profile Picture

Ayesha Wajahat 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans