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

Possible to map a value from the user creating a record to the record created?

(0) ShareShare
ReportReport
Posted on by 5

Hi there,

We have an 'office' lookup on a custom entity that's created quite often by our users. 

Most of our users will always use the same office when creating this record and I was hoping to add the same 'office' lookup to the systemuser object with a mapping to set the 'office' lookup on custom entity to that of the user creating it, but when I go to the N:1 relationships, I don't have an option to create mappings between the custom entity and the createdby user.

I feel like I'm missing something obvious. Is there a way to default fields on records created by a user to values set on the user's systemuser record without having to revert to javascript?

Thanks.

Edit: a clarification - I was looking for a way to pre-populate the field at form-load, rather than on-save. Looks like the only option is indeed javascript.

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi Jarrad,

    The most suitable solution is to use Flow.

    First of all, we need to know whether your D365 is online or OP, because Flow only supports Online environment.

  • Jarrad Profile Picture
    5 on at

    Hi Hao,

    Sorry, I should've said - we're on-premise, so Flow isn't an option.

    Any other options -- other than custom javascript/plugins -- that you're aware of?

    If not, it would seem to be a missed opportunity, not being able to set per-user-default-values for fields.

    Thanks.

  • Suggested answer
    LuHao Profile Picture
    40,892 on at

    Hi Jarrad,

    I would recommend you use workflow.

    Go to Settings > Processes, new a workflow for custom entity.

    pastedimage1590396980947v1.png

    Start When: Record is created. Scope: Organization.

    pastedimage1590397043753v2.png

    Update the custom entity record. Use Create By (User)'s office lookup field value to populate the custom entity's office lookup field.

    pastedimage1590397215011v3.png

  • Jarrad Profile Picture
    5 on at

    Thanks for the suggestion on workflows, Hao. But a workflow will only run after the user clicks save. Sorry I wasn't clear in the OP, but I'm looking for a solution to set the field when the form loads, rather than on save, similar to the relationship mapping functionality.

    While users will usually set the field to the same value (hence the desire to default it for them), they'll sometimes need to set it to a different one. So the goal is to default the field to their usual office, while still giving them the opportunity to change it if needed.

    I appreciate I can set the workflow to set the field only if they leave it blank, but we want to give them the visual reminder of what it will be set to by default.

    So I'm guessing the only option here is to go with javascript.

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi Jarrad,

    Yes, you have to use javascript.

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