Skip to content

Instantly share code, notes, and snippets.

@heijmerikx
Created May 23, 2022 06:26
Show Gist options
  • Save heijmerikx/63e1032f96de6379926dc583f0f9aa7e to your computer and use it in GitHub Desktop.
Save heijmerikx/63e1032f96de6379926dc583f0f9aa7e to your computer and use it in GitHub Desktop.
<script>
// replace the current flow New_Guest_Appointment_Flow with the api name of your own flow
// replace the current URL with your ownSite URL
$Lightning.use("runtime_appointmentbooking:lightningOutGuest",
() => {
console.log('lightning out loaded');
try {
$Lightning.createComponent(
"lightning:flow", // top-level component of your app
{}, // attributes to set on the component when created
"FlowContainer", // the DOM location toinsert the component
function (component) {
// API name of the Flow
component.startFlow("New_Guest_Appointment_Flow");
}
);
} catch (e) {
console.log(e);
}
}
,'https://live-demo-developer-edition.eu26.force.com' // Site endpoint
);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment