function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve ConnellySteve Connelly 

having problems configuring a URL in lightning component.

Working in Lightning...I am trying to add a flow URL to a lightning component. Here is what I have entered:
<div aura:id="container">
    <p><lightning:formattedUrl value="https://promnetwork--hd2sf--c.cs27.visual.force.com/flow/runtime.apexp?flowDevName=Security_Exception_Request&flowVersionId=301220000001I27"/></p>
    </div>

When I try to save the component, I get this error:
Failed to save HDFlowLauncher.cmp: c:HDFlowLauncher:22,2: ParseError at [row,col]:[23,2] Message: The markup in the document following the root element must be well-formed.: Source

This is a URL...I can't edit it and have it still work. I entered this as a Lightning Configured URL so i can't sort out the problem.

Any suggestions out there?
Thanks much,
Steve
Best Answer chosen by Steve Connelly
AbhimanyuAbhimanyu
Hey Steve,

I suggest you use standard flow tag in lightning component to use lightning:flow, its much cleaner and also you do not have to worry about updating base URL when deploying to UAT or Production.
Here is the link
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_cmp.htm

Please mark it as the best answer if it helped.

 

All Answers

AbhimanyuAbhimanyu
Hey Steve,

I suggest you use standard flow tag in lightning component to use lightning:flow, its much cleaner and also you do not have to worry about updating base URL when deploying to UAT or Production.
Here is the link
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_cmp.htm

Please mark it as the best answer if it helped.

 
This was selected as the best answer
Steve ConnellySteve Connelly
I figured this out. The problem was really very simple. The URL included an "&" and the component was choking on that. I changed it to "&amp;" and that solved the problem.

Thank you for the suggestion though. I will read the article and see what I can learn from it.
Steve