Please share your queries and suggestions by connecting with us on LinkedIn


IM Salesforce

⭐ 𝑮𝒆𝒕𝒕𝒊𝒏𝒈 𝒄𝒖𝒓𝒓𝒆𝒏𝒕 𝑳𝒐𝒄𝒂𝒕𝒊𝒐𝒏 𝒊𝒏 #𝑳𝑾𝑪 𝑪𝒐𝒎𝒑𝒐𝒏𝒆𝒏𝒕 𝒂𝒏𝒅 𝒅𝒊𝒔𝒑𝒍𝒂𝒚𝒊𝒏𝒈 𝒊𝒕 𝒐𝒏 #𝑮𝒐𝒐𝒈𝒍𝒆𝑴𝒂𝒑

⏩ A 𝐥𝐢𝐠𝐡𝐭𝐧𝐢𝐧𝐠-𝐦𝐚𝐩 component displays a map of one or more locations, using geocoding data and mapping imagery from Google Maps.

⏩ The map image is shown in a container, with an optional list of the locations.

⏩ The list is visible by default when multiple locations are specified.

⏩ When you select a location title in the list, its map marker is activated.

⏩ The list is shown beside or below the map, depending on the width of the container.

⏩ Syntax: <𝐥𝐢𝐠𝐡𝐭𝐧𝐢𝐧𝐠-𝐦𝐚𝐩 𝐦𝐚𝐩-𝐦𝐚𝐫𝐤𝐞𝐫𝐬={𝒎𝒂𝒑𝑴𝒂𝒓𝒌𝒆𝒓𝒔}> </𝐥𝐢𝐠𝐡𝐭𝐧𝐢𝐧𝐠-𝐦𝐚𝐩>


⏩ 𝐦𝐚𝐩-𝐦𝐚𝐫𝐤𝐞𝐫𝐬 is an array of markers that indicate location.

⏩ A marker contains:
◾ 𝐋𝐨𝐜𝐚𝐭𝐢𝐨𝐧 𝐈𝐧𝐟𝐨𝐫𝐦𝐚𝐭𝐢𝐨𝐧: A coordinate pair of latitude and longitude, or an address composed of address elements to be geocoded.
◾ 𝐃𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐯𝐞 𝐈𝐧𝐟𝐨𝐫𝐦𝐚𝐭𝐢𝐨𝐧: Optional title, description, and an icon. These items are relevant to the marker but not specifically related to location.




📂 𝑱𝑺 𝑪𝒐𝒅𝒆:

𝐦𝐚𝐩𝐌𝐚𝐫𝐤𝐞𝐫𝐬= [];

// 𝗙𝗲𝘁𝗰𝗵𝗶𝗻𝗴 𝗰𝘂𝗿𝗿𝗲𝗻𝘁 𝗹𝗼𝗰𝗮𝘁𝗶𝗼𝗻 𝗼𝗳 𝗹𝗼𝗴𝗴𝗲𝗱 𝗜𝗻 𝘂𝘀𝗲𝗿
𝙣𝙖𝙫𝙞𝙜𝙖𝙩𝙤𝙧.𝙜𝙚𝙤𝙡𝙤𝙘𝙖𝙩𝙞𝙤𝙣.𝙜𝙚𝙩𝘾𝙪𝙧𝙧𝙚𝙣𝙩𝙋𝙤𝙨𝙞𝙩𝙞𝙤𝙣(𝙥𝙤𝙨𝙞𝙩𝙞𝙤𝙣 => {

// 𝗚𝗲𝘁 𝘁𝗵𝗲 𝗟𝗮𝘁𝗶𝘁𝘂𝗱𝗲 𝗮𝗻𝗱 𝗟𝗼𝗻𝗴𝗶𝘁𝘂𝗱𝗲 𝗳𝗿𝗼𝗺 𝗚𝗲𝗼𝗹𝗼𝗰𝗮𝘁𝗶𝗼𝗻 𝗔𝗣𝗜
const currentLatitude=𝙥𝙤𝙨𝙞𝙩𝙞𝙤𝙣.𝙘𝙤𝙤𝙧𝙙𝙨.𝙡𝙖𝙩𝙞𝙩𝙪𝙙𝙚;
const currentLongitude=𝙥𝙤𝙨𝙞𝙩𝙞𝙤𝙣.𝙘𝙤𝙤𝙧𝙙𝙨.𝙡𝙤𝙣𝙜𝙞𝙩𝙪𝙙𝙚;

// 𝗔𝗱𝗱 𝗟𝗮𝘁𝗶𝘁𝘂𝗱𝗲 𝗮𝗻𝗱 𝗟𝗼𝗻𝗴𝗶𝘁𝘂𝗱𝗲 𝘁𝗼 𝘁𝗵𝗲 𝗠𝗮𝗿𝗸𝗲𝗿𝘀 𝗟𝗶𝘀𝘁
this.𝐦𝐚𝐩𝐌𝐚𝐫𝐤𝐞𝐫𝐬=[{
location : {
𝙇𝙖𝙩𝙞𝙩𝙪𝙙𝙚: currentLatitude,
𝙇𝙤𝙣𝙜𝙞𝙩𝙪𝙙𝙚: currentLongitude
},
}];
});




📃 #Salesforce Official Documentation: developer.salesforce.com/docs/component-library/bu…

8 months ago | [YT] | 0

IM Salesforce

⭐𝑯𝒐𝒘 𝒕𝒐 𝒄𝒉𝒆𝒄𝒌 𝒊𝒇 #𝑺𝒂𝒍𝒆𝒔𝒇𝒐𝒓𝒄𝒆 𝑶𝑹𝑮 𝒊𝒔 𝑺𝒂𝒏𝒅𝒃𝒐𝒙 𝒐𝒓 𝑷𝒓𝒐𝒅𝒖𝒄𝒕𝒊𝒐𝒏 ❓

⏩ Using Apex class to check if the current ORG is a sandbox or Production.

⏩ Salesforce has a sObject called Organization.

⏩ This sObject has a standard field, IsSandbox Which will be true if it is a sandbox.

⏩ For Production this field will be false.

⏩ Sample Code:
𝐎𝐫𝐠𝐚𝐧𝐢𝐳𝐚𝐭𝐢𝐨𝐧 𝐚_𝐎𝐑𝐆 = [𝐒𝐞𝐥𝐞𝐜𝐭 𝐈𝐝, 𝐍𝐚𝐦𝐞, 𝐈𝐬𝐒𝐚𝐧𝐝𝐛𝐨𝐱 𝐟𝐫𝐨𝐦 𝐎𝐫𝐠𝐚𝐧𝐢𝐳𝐚𝐭𝐢𝐨𝐧];
𝐢𝐟(𝐚_𝐎𝐑𝐆.𝐈𝐬𝐒𝐚𝐧𝐝𝐛𝐨𝐱){
𝐒𝐲𝐬𝐭𝐞𝐦.𝐝𝐞𝐛𝐮𝐠('𝐓𝐡𝐢𝐬 𝐢𝐬 𝐒𝐚𝐧𝐝𝐛𝐨𝐱');
}
𝐞𝐥𝐬𝐞{
𝐒𝐲𝐬𝐭𝐞𝐦.𝐝𝐞𝐛𝐮𝐠('𝐓𝐡𝐢𝐬 𝐢𝐬 𝐏𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧');
}

⏩ Organization will always return only one record all the time.

⏩ So you can return the query in one object or list of objects.

⏩ You will still get the results.

9 months ago | [YT] | 2

IM Salesforce

⭐𝑯𝒐𝒘 𝒕𝒐 𝒖𝒔𝒆 𝒄𝒖𝒔𝒕𝒐𝒎 𝒇𝒐𝒏𝒕 𝒊𝒏 #𝑺𝒂𝒍𝒆𝒔𝒇𝒐𝒓𝒄𝒆 #𝑳𝑾𝑪



⏩ The very first is to download the font file (single or zip file): "fonts.google.com/"

⏩ Once you have successfully downloaded the font file. Upload it as a static resource.

⏩ 𝐒𝐚𝐦𝐩𝐥𝐞 𝐈𝐦𝐩𝐥𝐞𝐦𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧 👇



📂 𝐇𝐓𝐌𝐋 𝐅𝐢𝐥𝐞:
<template>
<lightning-card title="Custom Fonts using static resource">
<𝐩>This is custom font.<br/>
Font name is Rubik Wet Paint.
</𝐩>
</lightning-card>
</template>



📂 𝐂𝐒𝐒 𝐅𝐢𝐥𝐞:
p {
font-family: '𝐑𝐮𝐛𝐢𝐤 𝐖𝐞𝐭 𝐏𝐚𝐢𝐧𝐭';
font-size: 20px;
}
@font-face
{
font-family:'𝐑𝐮𝐛𝐢𝐤 𝐖𝐞𝐭 𝐏𝐚𝐢𝐧𝐭';
𝐬𝐫𝐜:𝐮𝐫𝐥(/𝐫𝐞𝐬𝐨𝐮𝐫𝐜𝐞/𝐑𝐮𝐛𝐢𝐤_𝐖𝐞𝐭_𝐏𝐚𝐢𝐧𝐭/𝐑𝐮𝐛𝐢𝐤𝐖𝐞𝐭𝐏𝐚𝐢𝐧𝐭-𝐑𝐞𝐠𝐮𝐥𝐚𝐫.𝐭𝐭𝐟);
}



⏩ 𝑭𝒐𝒍𝒍𝒐𝒘 𝒕𝒉𝒆 𝒂𝒕𝒕𝒂𝒄𝒉𝒆𝒅 𝒔𝒕𝒆𝒑 𝒇𝒐𝒓 𝒄𝒐𝒎𝒑𝒍𝒆𝒕𝒆 𝒊𝒎𝒑𝒍𝒆𝒎𝒆𝒏𝒕𝒂𝒕𝒊𝒐𝒏.

9 months ago | [YT] | 1