Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Help? Setting name of record to account lookup value

  • 1.  Help? Setting name of record to account lookup value

    GOLD CONTRIBUTOR
    Posted Dec 22, 2020 11:20 AM

    I have a custom entity named "Provider". When I create a new "Provider", I select an account from my list. I am also asked for a name. This is redundant for me, as I want the name to be the same as the account name.

    My current approach to this is:

    • Hide the "name" field on the form.
    • Make account a required field.
    • This creates the record with a blank, unknown, or "New Provider" label (it is unclear what is happening, exactly)
    • Run a workflow (not a Flow) to automatically set the Provider record name field to the account on creation and on change when the account field changes.

    Is there a simpler way to do this? It seems that there must be.



    ------------------------------
    Adam Posegate
    Fox Valley Technical College
    Appleton WI
    ------------------------------
    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 2.  RE: Help? Setting name of record to account lookup value

    Posted Dec 22, 2020 01:21 PM

    You could turn it into a business rule. If NAME does not contain data and Account contains data. - Set Name to Account. Just make sure the scope is on more than just the form. If that doesnt make sense let me know and I can send some screen shots.



    ------------------------------
    Mike Hastings
    Technical Consultant
    Blue Horseshoe
    PEORIA AZ
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 3.  RE: Help? Setting name of record to account lookup value

    GOLD CONTRIBUTOR
    Posted Dec 22, 2020 01:30 PM

    Thanks, Mike. I'm running into an issue on this approach. The account field does not come up as one of the fields for me to select.



    ------------------------------
    Adam Posegate
    Fox Valley Technical College
    Appleton WI
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 4.  RE: Help? Setting name of record to account lookup value

    Posted Dec 22, 2020 01:46 PM

    Yep, I see what you are saying, its not an option in the SET options.  How built out is the provider entity?  If its new-er you could remove it and create another entity, then default the Primary field to something more valuable.

    Otherwise, I think you did the right thing with a workflow.



    ------------------------------
    Mike Hastings
    Technical Consultant
    Blue Horseshoe
    PEORIA AZ
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 5.  RE: Help? Setting name of record to account lookup value

    GOLD CONTRIBUTOR
    Posted 29 days ago

    @Adam Posegate - A question about your user experience.  Are you creating these provider records from the existing account record, or are you creating them as net new records and then choosing the account manually?  If you are doing them from the existing account record, you should be able to create a mapped relationship between the account record and the provider record where the new provider record can inherit values from the associated account record it was created from.



    ------------------------------
    Jonathan Blackham
    Sales Operations Specialist
    Valin Corporation
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 6.  RE: Help? Setting name of record to account lookup value

    GOLD CONTRIBUTOR
    Posted 21 days ago
    @Jonathan Blackham The provider records are being created, and then account is being selected from a field there. The provider is a child of different custom entity.

    ------------------------------
    Adam Posegate
    Fox Valley Technical College
    Appleton WI
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


  • 7.  RE: Help? Setting name of record to account lookup value

    SILVER CONTRIBUTOR
    Posted 19 days ago
    @Adam Posegate, I am confused on a couple of points.  You state provider records are being created and then account is being selected from a field there.  Is the account field a required field as part of creating the Provider record?  It seems it would need to be or the Provider records wouldn't have a Name populated until it was.  I may just be interpreting your statement incorrectly.

    The approach you outlined in your first post is a very common practice of mine as manually determining a "Name" for a related record is difficult for application users to understand so I use real-time workflows to populate the Name field quite often for the related record.  I would make the Name field "Business Recommended" instead of "Business Required" and then the real-time workflow populates the Name of the Provider record.

    But there is one very important thing to call out for your specific example.  The Account field on your Provider table is a relationship to the Account table, so the Provider "Name" value will change if you change to a different Account value.  However, if the name in the Account table changes, that will not automatically change the displayed value on your Provider table record.

    I hope this helps!

    ------------------------------
    Jim Lorrig
    Senior Business Solutions Consultant
    Heartland Business Systems
    Little Chute
    ------------------------------

    Digital Acceleration Binge Day.  January 28th 2021 | 11:00 AM - 2:00 PM EST


If you've found this thread useful, dive deeper into User Group community content by role