cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

response to javascript

i have in dynamics crm a button.when i click the button i send a Http request to Power Automate (Flow) to run it everything thing worked fine.

i want  to send a response to my java-script when the flow run finished .can anyone help me.

response1.JPGresponse text.JPG

4 REPLIES 4
Super User III
Super User III

hi @Hedibn  where is your javascript?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

@ChristianAbata 

sendFlowRequest = function () {

var id= Xrm.Page.data.entity.getId();
var name=Xrm.Page.data.entity.getEntityName();
var Lang= Xrm.Page.context.getUserLcid();

if (Lang ==1033)
{ alert("Margin updates itself in a few seconds. Please wait a moment on this webpage." );}
else
{alert("Der DB aktualisiert sich in ein paar Sekunden selbständig. Bitte warte so lange auf der Webseite.");}
var pathObj = {id };

parent.$.ajax({
type: "POST",
url: "https://prod-35.westeurope.logic.azure.com:443/workflows/443ba3214360476f9a483a20f15498f1/triggers/m...",
contentType: 'application/json',
data: JSON.stringify(pathObj),
success: function () {
setTimeout(function(){ Xrm.Page.data.refresh(true); },5000);}
});
}

@Hedibn  your javascript is like a web service or API?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,289)