View controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recordUpdated : function(component, event, helper) { | |
// Your custom functionality here | |
alert(‘I have changed’); | |
} |
View scheduler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
// replace the current URL with your ownand add “/lightning/lightning.out.js” after the Site URL | |
<script type="text/javascript" src=" https://live-demo-developer-edition.eu26.force.com/lightning/lightning.out.js"></script> | |
<script type="text/javascript" src="index.js"></script> | |
</head> | |
<body> | |
// the FlowContainer div is where the flow will be displayed | |
<div id="FlowContainer"></div> | |
</body> |
View reset.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| ', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' | |
FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C | |
WHERE S.relkind = 'S' | |
AND S.oid = D.objid | |
AND D.refobjid = T.oid | |
AND D.refobjid = C.attrelid | |
AND D.refobjsubid = C.attnum | |
ORDER BY S.relname; |
View esphome-co2-sensor-mhz19.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: "air-quality-indoor" | |
platform: ESP32 | |
board: "featheresp32" | |
wifi: | |
ssid: "YOUR WIFI NETWORK NAME" | |
password: "YOUR WIFI PASSWORD" | |
logger: |
View sf-function.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyFunctionRequest req = new MyFunctionRequest(); | |
req.inputPropertyOne = false; | |
req.inputPropertyTwo = ’String value’; | |
String jsonconfig = JSON.serialize(req); | |
Functions.Function myFunction = Functions.Function.get('MyNamespace.myFunction'); | |
Functions.FunctionInvocation invocation = myFunction.invoke(jsonconfig); | |
String jsonResponse = invocation.getResponse(); |
View register.handler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register for messages sent by hosting component | |
*/ | |
LCM.addMessageHandler((message) => { | |
if(message !== null){ | |
//Do Something | |
} | |
}); | |
/** |
View f.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LCM = { | |
sendMessage : function(userMessage) { | |
if (typeof LCC !== "undefined" && typeof LCC.onlineSupport !== "undefined") { LCC.onlineSupport.sendMessage("containerUserMessage", {payload: userMessage}); } | |
}, | |
addMessageHandler : function(handler) { | |
if (typeof LCC !== "undefined" && typeof LCC.onlineSupport !== "undefined") { | |
LCC.onlineSupport.addMessageHandler(handler); | |
} | |
}, | |
} |
View test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<lightning:container aura:id="TestApp" | |
src="{!$Resource.Test + '/index.html'}" | |
onmessage="{!c.handleMessage}" | |
onerror="{!c.handleError}" /> |
View testcontroller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
sendMessage : function(component, event, helper) { | |
const msg = { | |
name: "Test", | |
value: 1 | |
}; | |
component.find("TestApp").message(msg); | |
}, | |
handleMessage: function(component, message, helper) { | |
const payload = message.getParams().payload; |
NewerOlder