locked
Populating Fields RRS feed

  • Question

  • Hi,

    I have an accounts form and what I would like to do is when I select the Owner I'd like the Business Unit that is set in the users profile be populated, at the moment the business unit is manual lookup on the form but due to permissions is greyed out to Business Unit when a user adds an account, it's only available to users with higher rights.

    I am not sure how to make this work any chance of helping out?

    Thanks,

    Monday, September 19, 2011 5:16 PM

Answers

  • Hi,

    You can use the CRM 4.0 Retrieve  request to get the business unit of the record owner by passing the value in the filter, you may refer the following link for CRM 4.0 JScript retrieve method: http://msdn.microsoft.com/en-us/library/cc677077.aspx

    You may also set the business unit in a field using workflow (without coding):

    1. Create new workflow that will run on Record Owner Change

    2. Add step Update Record, select current entity and assign the owner busienss unit value to the custom business unit field.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Marked as answer by MTGL-PD Monday, September 19, 2011 10:01 PM
    Monday, September 19, 2011 8:41 PM

All replies

  • When you create an organizational structure, business units let you control access to data in user-owned entities. Most records in Microsoft Dynamics CRM have a user assigned as an owner. The user is associated with a business unit. You will use security roles to define privileges and access for users in the business unit. If you move a user to a different business unit, all the records owned by that user leave the old business unit and enter the new one.

    Some entities are business unit–owned. Team, Queue, Calendar, Equipment, Resource, and Resource Group are examples. If there is more than one group in your organization that exclusively uses these entities, consider creating a business unit to represent members of these groups.

    Monday, September 19, 2011 6:36 PM
  • The issue I have is that a user is assigned to a business unit when they create a new account it's not assigned to their business unit nor can they select a business unit, we don't really want the sales guys having free reign on editing which BU an account is looked after by.

    When a user adds an account the BU is left blank and the box greyed out but the default action is unassigned.

    Monday, September 19, 2011 8:09 PM
  • Hi,

    You can use CRM web service retrieve call via JavaScript to get user business unit details and then populate in the form field, you may refer the following Url for step by step instructions to retrieve field and then populate in the form,

    http://worldofdynamics.blogspot.com/2011/06/microsoft-dynamics-crm-2011-retrieve.html

    You may also refer: http://mileyja.blogspot.com/2011/03/crm-2011-retrievemultiple-calls-in.html


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, September 19, 2011 8:24 PM
  • that looks good is there a CRM4 version as we've yet to upgrade?
    Monday, September 19, 2011 8:31 PM
  • Hi,

    You can use the CRM 4.0 Retrieve  request to get the business unit of the record owner by passing the value in the filter, you may refer the following link for CRM 4.0 JScript retrieve method: http://msdn.microsoft.com/en-us/library/cc677077.aspx

    You may also set the business unit in a field using workflow (without coding):

    1. Create new workflow that will run on Record Owner Change

    2. Add step Update Record, select current entity and assign the owner busienss unit value to the custom business unit field.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Marked as answer by MTGL-PD Monday, September 19, 2011 10:01 PM
    Monday, September 19, 2011 8:41 PM
  • Thanks for this, managed to do what I wanted with Workflows and it's quite slick, need to do a little work on permissions now as although it works on change, there are some users where running adhoc fails so I need to sort that but, a job for tomorrow.

    Again thanks for all the pointers been most useful and I have sorted this in good time, at least now when Sales add new accounts the Business Unit is auto populated.


    Cheers

    Monday, September 19, 2011 10:04 PM