Power Automate: Auto Renew Opportunities
Power Automate
Apr 15, 2026 1:59 PM

Power Automate: Auto Renew Opportunities

by HubSite 365 about Microsoft

Software Development Redmond, Washington

Power Automate expert fixes polymorphic lookup failures in Dynamics CRM using Show Raw Inputs and conditional checks

Key insights

  • Power Automate: Automate opportunity renewals in Dynamics 365 using cloud flows that trigger on account changes.
    Set the flow to create renewal opportunity records so teams save time and reduce manual steps.
  • Show Raw Inputs: Use the flow run history feature to inspect exact data passed into each step.
    This reveals when the owner field contains a team ID instead of a user ID, which helps pinpoint failures quickly.
  • Polymorphic lookup: Fields like ownerid can reference different tables (for example, systemuser or team), so the flow must use the correct table type.
    Using the wrong reference causes the opportunity creation to fail when accounts are team-owned.
  • Conditional check: Add a condition to detect the owner table type and set the opportunity owner dynamically based on that result.
    This simple branch makes the flow handle both user and team ownership without errors.
  • Best practices: Test by switching account ownership between user and team, keep triggers and filters minimal, and log raw inputs for troubleshooting.
    Design flows to handle polymorphic fields and to fail loudly with clear error details when something goes wrong.
  • Community support: Leverage community forums and expert episodes to learn practical fixes and real-world patterns.
    Community tips often show step-by-step diagnostics and fixes that benefit both non-technical builders and experienced developers.

Overview: Microsoft’s Video Breakdown

The YouTube video from Microsoft titled "Ask a Community Pro | EP04" features Tom Gioielli explaining how to create automatic renewal opportunity records with Power Automate. The episode focuses on a frequent failure mode when an Account is owned by a team rather than a user. Moreover, it demonstrates practical tools and steps to diagnose and fix the issue without resorting to custom code. As a result, the video aims to help both builders and administrators improve flow reliability.


The Problem: Polymorphic Lookups and Ownership

At the core of the failure is a polymorphic lookup field such as ownerid, which can reference either systemuser or team. When flows assume the owner is always a user, they often try to set the new opportunity owner incorrectly and the flow fails. In the video, Tom runs the flow and shows that it succeeds for user-owned accounts but breaks for team-owned ones. Consequently, the error highlights the need to treat polymorphic fields with care in automated processes.


Diagnosis: Using Show Raw Inputs

Tom demonstrates how to use the Show Raw Inputs option in the flow run history to inspect exactly what data Power Automate receives at each step. By checking raw inputs, builders can see whether the owner reference points to systemuser or team, which reveals why a creation action fails. In addition, this method helps avoid guesswork and speeds up troubleshooting for non-developers. Therefore, adopting this diagnostic habit reduces time spent chasing misleading error messages.


Fixes and Best Practices

The recommended solution is to add a conditional check on the owner table type and then dynamically assign the correct owner during opportunity creation. Specifically, the flow tests whether the owner entity equals team or systemuser, and then uses the appropriate reference when setting the new record’s owner. Furthermore, Tom outlines simple expressions and flow actions that accomplish this without complex code. This approach keeps flows readable while making them resilient to mixed ownership models.


Tradeoffs and Implementation Challenges

Although the conditional fix increases robustness, it adds complexity and a small maintenance burden to each flow. For example, extra conditions and expressions can make the flow longer and slightly harder to follow for new maintainers. Additionally, organizations need to test different ownership scenarios, including nested team assignments or changes in team membership, which can reveal other permission or lookup issues. Nevertheless, the tradeoff favors reliability: a few extra steps prevent repeated failures and manual corrections.


Testing, Governance, and Performance Considerations

Testing both user-owned and team-owned accounts is essential, and Tom recommends switching ownership during validation to confirm the flow handles each case. Meanwhile, teams should document the conditional logic and any expressions used so future editors can understand the intent. From a governance viewpoint, administrators must ensure flows run with appropriate privileges to set owners, since team ownership can require different permissions than individual users. Finally, while the conditional checks add minor execution time, they avoid larger delays caused by failed runs and retries.


Community Value and Learning

The episode highlights the Power Platform community as a key resource for builders at every level, from beginners to seasoned developers. Tom credits community forums and shared solutions for surfacing this pattern and for refining the recommended fixes. Consequently, engaging with the community accelerates learning and helps teams apply tried-and-true approaches rather than reinventing solutions. Moreover, community dialogue surfaces edge cases that improve overall flow design.


Practical Recommendations

For teams implementing automatic renewal flows, start by enabling detailed run history and using Show Raw Inputs as a standard diagnostic step. Next, add a simple conditional to check the owner type and set the owner reference accordingly before creating records. Also, include test cases that flip account ownership between users and teams to confirm the flow behaves as expected. By following these steps, teams will reduce failures while keeping flows maintainable.


Conclusion: Simple Changes, Big Impact

Microsoft’s video makes a clear case that small, well-placed checks can prevent common flow failures related to ownership and polymorphic lookups. While the fix introduces modest complexity, it significantly improves reliability and reduces manual rework. Lastly, the episode underlines that practical diagnostics and community knowledge together make Power Automate more accessible and robust for organizations of all sizes.


Power Automate - Power Automate: Auto Renew Opportunities

Keywords

Power Automate opportunity renewal, automatic opportunity renewals Power Automate, Dynamics 365 opportunity renewal automation, Power Automate renewal flow tutorial, Dynamics 365 Sales renewal automation, create recurring opportunities Power Automate, automate CRM renewals Power Automate, Ask a Community Pro Power Automate renewals