Hi Community,
Is it possible to create a command bar button so that when a user clicks on the button, the PowerFx obtains the url? What is the function/syntax?
Desired outcome:
Or is there a simpler/easier way to do this? Am I over-thinking the process? Any advice welcomed.
--
Thank you
Hi @JLKM ,
You can find details from the link: Xrm.Navigation (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/
Hi @powerH
I am exploring Custom Page, and I am new to this. Hope to seek your expertise.
I am passing in viewid from the url (using parent.window.location) instead of recordId. What should my javascript syntax for Xrm.Navigation.navigateTo be?
Thanks in advance!
Hi @AbdulWahab
Awesome link. Thank you.
But I need to click the button on the Main grid/a specific view and read the url to obtain the viewid.
Can the video method do this?
Hi @JLKM
The link might be going to solve these issues: (3) Trigger a Power Automate Flow from a Custom Button without HTTP request - YouTube
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/
Hi @AbdulWahab
With this method, the flow with the HTTP trigger uses the flow owner/admin's connection, not the user's connection, right? Is there a way to this this, yet use the user's connection for the flow?
--
Thank you
Hi @AbdulWahab ,
Thank you for the code snippet to do the call directly using JS.
This is certainly doing the trick. What I like about the Custom Page approach is the fact that you are able to display the status of the Power Automate Flow in the page and enrich the application in terms of user interaction.
Best regards
Hauke
Hi @JLKM ,
I do not think so custom page is required here. you can trigger 'power automate' from js using the below code. Use an HTTP Request trigger on your 'power automate'. you can pass parameters also.
function triggrFlow() {
var flowUrl = "https://prod-17.australiasoutheast.logic.azure.com:443/work";
var input = JSON.stringify({
"Id": donationId.replace("{", "").replace("}", ""),
"UserId": userId.replace("{", "").replace("}", "")
});
var req = new XMLHttpRequest();
req.open("POST", flowUrl, true);
req.setRequestHeader('Content-Type', 'application/json');
req.send(input);
}
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/
Hi @JLKM ,
I would suggest to create a Custom Page where you are able to link a Power Automate flow to a control.
This is well explained here:
Best regards
Hauke
Hi Abdul
I have amended my original post as I missed out the flow part. Hope you have a fresh idea.
Thanks
Hi @JLKM
I do not think it is possible using power fx due to my very little knowledge. You can do it using JS. Here is the helpful link: getGlobalContext (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Let me know if I can provide you with more details.
Thanks
Regards,
Abdul Wahab
Power Platform & Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a/
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
Fubar
11
Super User 2025 Season 1