Skip to content

Instantly share code, notes, and snippets.

const x = 'abc'; // Coerces to true in a boolean context
const y = null; // Coerces to false in a boolean context
// "!" Creates a boolean context and returns the opposite.
const a = !x; // Value a is opposite of x, false.
const b = !y; // Value b is opposite of y, true.
if (a) {
// NOT executed.
}
if (b) {
// Executed.
/*
Great Adam Spriggs suggestion...
https://salesforce.stackexchange.com/questions/145037/developing-and-testing-cloudpages
...is to use TreatAsContent() to bypass the CloudPage caching
%%=TreatAsContent(HttpGet(Concat("https://www.domain.com/your/webhook.html?x=",GUID())))=%%
*/
<script runat="server">
Platform.Load("core","1.1.1");
@danieldrasdo
danieldrasdo / sfmc-sql-enterprise-attributes.sql
Last active December 20, 2017 21:49 — forked from wvpv/sfmc-sql-enterprise-attributes.sql
SFMC SQL select profile attributes values from the EnterpriseAtrributes data view
select
a.customerID
, s.emailAddress
from _EnterpriseAttribute a with (nolock)
inner join _Subscribers s with (nolock) on (s.subscriberID = a._SubscriberID)
var linkMap = {
"%%h1_link%%" : "http://www.brighton.com/?h1",
"%%h2_link%%" : "http://www.brighton.com/?h2",
"%%s1_link%%" : "http://www.brighton.com/?s1",
"%%s2_link%%" : "http://www.brighton.com/?s2"
};
$("body").text(function(index, originalText) {
for ( var link in linkMap ) {
<style>
p {
text-align: left;
margin-bottom: 30px;
line-height: 24px;
}
div {
position: relative;
text-align: center;
sup
top: -0.5em
font-size: 65%
line-height: 0
position: relative
vertical-align: baseline