Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Can I start an on demand workflow from Dynamics Portal using javascript?

(0) ShareShare
ReportReport
Posted on by 48

I want to track visits to a specific Portal page. And I want this log to be stored as an entity in CRM so I can use it for other CRM purposes.
I was wondering if I can start an on demand workflow from javascript within the Portal to perform this task. Or maybe someone has a better idea...


Thanks a lot!

Elowy.

*This post is locked for comments

  • Verified answer
    Dmytro Rutkovskyi Profile Picture
    1,835 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    You can use "custom plugin code" approach in the post above by Andrew Butenko.

    Alternatively you can see this article - blogs.msdn.microsoft.com/.../enhanced-dynamics-365-knowledgebase-usage-analytics-with-azure-application-insights-and-power-bi for advanced technique of gathering portal activity data and use it even inside Dynamics.

    Its all based on your scenario and needs, but in general case storing all visits  to CRM is not the best idea. Its better to run some scheduled task to import some combined date from a different source (like app insights) on daily/hourly basis.

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    Hello,

    Alternatively you can use following approach - uds.systems/.../how-to-run-custom-code-in-dynamics-365-portal

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    Hi,

    You can call workflow using JavaScript, please follow this article.

    crmhub.blogspot.com/.../execute-workflow-using-java-script-MS-Dynamic-CRM.html

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    You can use OData Feed  only for querying you can't use it for entity creation from portal.

  • Elowy GrootCRM Profile Picture
    48 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    Nice! But will this work for updates on entities a well? Or just for GET calls?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    you can do it easily using entity lists odata in portals. Refer this:

    arpitmscrmhunt.blogspot.com/.../adxstudio-portal-how-to-use-odata.html

  • Elowy GrootCRM Profile Picture
    48 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    Thanks, Saad.

    But I think you need the Xrm framework to perform Odata calls from javascript. And as far as I know the framework is not availble in the Portal.

  • Community Member Profile Picture
    on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    You can use Odata calls to update your crm entity on Dynamics Portal.

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    No, I don't think you can do that.

  • Elowy GrootCRM Profile Picture
    48 on at
    RE: Can I start an on demand workflow from Dynamics Portal using javascript?

    Thanks Mahender.

    And is it possible to hide the entity form and 'push' the button from javascript? Otherwise I still need some user interaction to start the workflow.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans