Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Update Company Owner based on value in custom Entity

Posted on by 85

Hello community.

Three pieces of info to set the scene:

We have a custom field on Company entity called Sector.

We have an option set Sectors that is the source of the data for Sector.

We have a custom entity Sector Owner, that lists the relevant account manager (Owner) for each Sector.

We regularly need to change ownership of a sector (at busy times we have temporary sales managers and the sector workload is redistributed both then and again when we get quiet again)

I am looking to identify a way (workflow?) to reassign Company Owner based on the Owner in the Sector Owner entity.

I thought this would be a workflow, but i do not see the Owner field listed on the Company page but equally do not see the Sector Owner entity listed to use as the update value.

*This post is locked for comments

  • Mark WHE Profile Picture
    Mark WHE 85 on at
    RE: Update Company Owner based on value in custom Entity

    Many thanks Rawish. That makes things a lot easier (user proof!) as the update can happen when the Sales Director amends the sector owners.

  • Verified answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Update Company Owner based on value in custom Entity

    Hi Mark,

    okay so it happens at the record level not on owner level. Assign relationship behaviour will take place from parent record to child record.

    so for eg. Bob is the owner of sector A and sector A has 4 companies namely comp1, comp2, comp3, comp4. Now if you change owner of Sector A to Rawish; with assign :cascade all behaviour all companies (child records ) within sectory A will have Rawish as the owner.

    Bob might have other sectors such as B , C. D, they will stay uneffected.

    hope  it makes sense.

  • Mark WHE Profile Picture
    Mark WHE 85 on at
    RE: Update Company Owner based on value in custom Entity

    Thanks Rawish.

    I had started to think that after your last post. However i was not sure that would work. So for example, lets say sector A is assigned Bob. So all Company records with a sector of A have Bob as the owner. Now i change A to Rawish. Will only companies with a sector of A be assigned to Rawish or ALL companies with Bob as a sector owner (Bob is also owner on sectors F, M and Y)? I am beginning to wonder if the relationship may be set up wrong because 1 person can be owner of several Sectors in Sector Owners (i will check that with our solution provider).

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Update Company Owner based on value in custom Entity

    Hi Mark,

    Actually if you need it to trigger when you change ownership on the parent record ( Sector Owner). You can actually use out of the box relationship behaviour, you can check that from customizations > customize the system >  entity > sector owner > 1:n relationhip and check it relationship with companny and see what you see there. make sure Assign action is "Cascade all" so.

    5432.1.png

    https://www.google.com/search?q=relationship+behaviour+dynamics+crm&rlz=1C1GCEU_en-gbIN820IN820&oq=relationship+behaviour+dynamics+crm&aqs=chrome..69i57j0l3.10773j0j9&sourceid=chrome&ie=UTF-8  

  • Mark WHE Profile Picture
    Mark WHE 85 on at
    RE: Update Company Owner based on value in custom Entity

    Hi Rawish,

    Thanks for the reply.

    Yes the Company entity has organisation scope. I assume then this function would only be achievable with some back-ground/server coding?

    The relationship between Company and Sector Owner is a 1:N from Sector Owner.[OwnerID] to Company.[OwnerID]

    Co-_2D00_-Sec-RLT.PNG

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Update Company Owner based on value in custom Entity

    "but i do not see the Owner field listed on the Company page"

    looks like its an organization scope entity hence you wont see an owner field created( gets created when entity is user-team based)

    also you mentioned you donot see sector owner entity listed - you wont see child entities from the workflow. its a limitation of the workflow ie. you can only see and update a parent entity from the workflow.

    what is the relation between Company and Sector owner?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans