web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Opportunity renewals created automatically if account is assigned to a team

(1) ShareShare
ReportReport
Posted on by 182
Hello, in our customized process of opportunity renewal creation, when an account is assigned to a sales rep, the renewal gets created (with Power Automate flow) when the due date has come, but when it is assigned to a team (inside sales), it does not work.
Does anyone know if this is a default setting of Microsoft or could this be changed? Could a Power Automate flow make the difference when the account is assigned to a team, but still create the opportunity renewal?
 
Thanks
Cat
I have the same question (0)
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,979 Super User 2025 Season 2 on at
    As a customized process, it's a bit difficult for us to know what might be going on. You'll want to do the following (and provide these details if you need more help). This will require someone with Admin permissions in your environment:
    • Go to https://make.powerapps.com and login with the admin account
    • In the left menu, go to Solutions and then scroll all the way down to open the "Default Solution"
    • Once in the default solution, open the "Cloud Flows" menu in the middle navigation column
    • Your flow should live somewhere in here. You will want to open it to see details. The details page for the flow will include the past 21 days of run history and will clearly indicate if it succeeded or failed
    • If you find any failed runs, open it up and it should show where the error occurred. If you post the flow details and some of this information we may be able to help
     
     
     
  • Cat_Car Profile Picture
    182 on at
    Hello, I am sorry for the misunderstanding. I didn't mean that the flow is failing, but meant to say that it seems that when an account is assigned to a team, Dynamics cannot create the renewal based on the flow. I might be mistaken, but in the flow, there are no conditions that is selecting the account owner.
    Here is a screenshot of the flow.
    No other conditions in the flow.
    And I've tried some test switching an account from the team to my name and the renewal opportunity gets created.
     
    Cat
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,979 Super User 2025 Season 2 on at
    It's a bit hard to diagnose through screenshots on the forum, and without knowing your system structure.  Some questions from what I can see:
     
    • What is the table and filter criteria being used in the "List Active Customer Line of Business" action?
    • When creating the Opportunity (The "Create a renewal Opportunity" step, is anyone specific being listed in the owner field?
    • Does the flow run at all for Accounts assigned to your team?
     
    Without seeing more, I would think you have one of two problems.
    1.  The criteria that is listing out your "Customer Line of Business" has some filter that is causing it to not pick up Accounts owned by the team
    2. When creating the Opportunity, the team is not properly being assigned
     
  • Cat_Car Profile Picture
    182 on at
    Hello, oh I think I get it and think it is in the Create a renewal Opportunity step. And I do have flows that failed.
    But here are the answers to your questions :
     
    • What is the table and filter criteria being used in the "List Active Customer Line of Business" action? - 
     
    statecode eq 0 and Microsoft.Dynamics.CRM.On(PropertyName='gm_nextrenewalperiodstartdate',PropertyValue='@{formatDateTime(utcNow(),'yyy-MM-dd')}')
     
    • When creating the Opportunity (The "Create a renewal Opportunity" step, is anyone specific being listed in the owner field?
    /systemusers(@{outputs('Get_the_Account')?['body/_ownerid_value']})
     
    In a failed flow, I found part of a message in the Get the Account step that does identify the ownerid_value and each failed points to an account assigned to "Ventes internes" and that is our sales team.
      "_ownerid_value@OData.Community.Display.V1.FormattedValue": "Ventes internes",
      "_ownerid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "ownerid",
      "_ownerid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "team",
      "_ownerid_value@odata.type": "#Guid",
      "_ownerid_value": "c8502f73-09c9-ea11-a812-000d3a3035b8",
     
    part of a screenshot of the Get the Account step:
    I found in the Output of the step Create a renewal opportunity this part :
        "message": "Entity 'systemuser' With Id = c8502f73-09c9-ea11-a812-000d3a3035b8 Does Not Exist",
     
    So that means this is the problem. I am guessing this isn't easy to change being having a very basic knowledge of Power Automate.
    But if you have any information on how I can change this, it would be very much appreciated.
     
    Thanks a lot
    Cat
     
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,979 Super User 2025 Season 2 on at
    That's actually perfect, and exactly what I was hoping to see!
     
    The issue here is that the owner field on tables is what is known as Polymorphic, which just means that it is a lookup field that can point to records in more than one table. For [Owner], it can be either a user or a team.
     
    In this case, you are trying to pass in a Team GUID but are telling the system that it is a user. That's why it is saying it can't find the owner, it is because it is searching on the User table.
     
    You will need to conditionally set the table name of the owner based on if you are assigning a user or a team.
     
    User Format:
    systemusers(guid)
     
     
    Team Format:
    teams(guid)
     
     
    You could do this in an if statement within the value if you want, something like the following.
     
    if(
      equals(outputs('Get_the_Account')?['body/_ownerid_value@Microsoft.Dynamics.CRM.lookuplogicalname'], 'team'),
     'teams',
     'systemusers'
    )
     
     
    The syntax might not be perfect, but basically this is what it is doing:
    • Checks the table that the owner of the Account record is on to see if it matches 'Team'
    • If so, it sets the owner table definition in your Opportunity Owner field to the set name of the table 'teams'
    • Otherwise, it defaults to 'systemusers'
    So in the owner field, you would enter that formula and insert it, the add in an open parentheses, the reference to the Account Owner Value/GUID, then a close parentheses.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 57 Super User 2025 Season 2

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 57 Super User 2025 Season 2

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 26

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans