MCC badges awarded For April - June
Check out the latest community members who earned a Microsoft Dynamics 365 Community Contributors (MCC) badge. | View
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
We are using Business Units in our D365 CE environment. I added to the Account creation form a field for "Business Unit". I would like to be able to default the "Business Unit" field on the Account to the Business Unit associated with the logged in user when a record is created. Any guidance on how best to accomplish this would be appreciated.
Here's what you can do.
I'm assuming you have a lookup to the Business Unit entity created on the Account record, in that case, you can create the following workflow on Create of the Account with the following steps -
1. Create a Real-time workflow (even a Background workflow would do) that has only 1 Update step for the Account which you are creating. Make sure the scope is set to the One Who Makes Changes to the record.
2. In the Update Steps, set the Lookup to the related Created By's Business Unit lookup as shown below
So, whenever you or anyone creates a record, their Business Unit will be populated in the lookup -
Hope this helps!
You could also use JS code to do this.
We just need to get the current login user first and set his Business unit to the field, here is the sample code.
Please add this js to webresource and add the "setBusinessUnit" function to Onload event in Account form.
And here is the result, when I opening Account form, the "Business Unit" field will be set value of the current user's Business Unit.
Hope it helps.
If my or anyone's approach helped you, please mark the answer as verified. This will help others identify the solution.
I am working on data import into D365 CE today but when I am able to try the provided solutions I will make sure to mark the one that I used.
Business Applications communities