To add conditional logic IF THEN SF HTML email templates - Merge fields start with {! and end with }. You do not use {! or } within the merge field. In addition, you can use a CASE statement, which is easier to read. {!CASE(Cohorts__c.OwnerFirstName, "Bob", "Boblink", "Tim", "Timlink", "Anna", "Annalink", "")} Or, if…
Salesforce
Answered Mar 6, 2023
·
5.7K Views
Read answer →
The thing you're looking for is the safe navigation ternary operator in apex which was introduced in Winter '21 (API v50.0) It's the reverse of what you thought it was, ?., and it helps us deal with nulls in a very compact fashion (as opposed to the previous null checks that we had to pepper all over the place). Both…
Salesforce
Answered Mar 6, 2023
·
1.6K Views
Read answer →
Multiple users is not a supported use case in sfmc login. Last-in-wins for Contact Key. Logout, similarly, is not currently (20220126) supported. Logout can be implemented by your application by clearing Attributes, removing Tags and setting the Contact Key to some unique value. DO NOT REUSE CONTACT KEYS like "logged…
Salesforce
Answered Mar 3, 2023
·
968 Views
Read answer →
To resolve the error - cannot read property 'play' of undefined, you must understand that - You likely have two errors. The first is that you are trying to send an email from a cacheable method (which you can't do, as a cacheable cannot perform DML).This will be causing an error. Change: @AuraEnabled(cacheable=true)…
Salesforce
Answered Mar 1, 2023
·
959 Views
Read answer →
For force slds and lightning components use the lightning:avatar https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_avatar.htm
Salesforce
Answered Mar 1, 2023
·
691 Views
Read answer →
The multiple if statements in Salesforce formula field is a wacky one, that's true. I hate working with it, but do have a couple of pointers. The IF statement is pretty easy to get a handle on. Think of it as a 3 part function. IF(isTrue, then-thing, else-thing) If you want a nested condition, put that in the…
Salesforce
Answered Feb 28, 2023
·
4.1K Views
Read answer →
To avoid this issue, kindly make sure the below for OpportunityLineItem(Opportunity Product) records: We cannot set both TotalPrice and UnitPrice to null in the same Insert, update and Upsert call. UnitPrice field or TotalPrice is required. You cannot specify both. If you specify Discount and Quantity, UnitPrice field…
Salesforce
Answered Feb 28, 2023
·
2.4K Views
Read answer →
Unfortunately, you can't put mailto html body with lwc. RFC 2368 states:The special hname "body" indicates that the associated hvalue is the body of the message. The "body" hname should contain the content for the first text/plain body part of the message. ... (Emphasis added).
Salesforce
Answered Feb 28, 2023
·
1.1K Views
Read answer →
The only solution I can think of to give a user "Salesforce login as another user" access without giving them system admin rights is.. create another user and give this user the access that is required (setting the right profile and roles etc). So, the user has to switch between the existing and this new user access.
Salesforce
Answered Feb 27, 2023
·
1.1K Views
Read answer →
A controller extension in Salesforce (that extends a standard controller) will look like this in Apex: public class MyControllerExtension { public MyControllerExtension(ApexPages.StandardController ctrl) {..} public PageReference actionMethod1() {..} public void actionMethod2() {..} } and in a VF page as .. markup If…
Salesforce
Answered Feb 27, 2023
·
614 Views
Read answer →
In contradiction to what the current documentation claims, you can observe that the LAST_N_DAYS in soql date literally includes today's data. To be sure, I ran this query: SELECT CreatedDate FROM MyObject__c WHERE CreatedDate = LAST_N_DAYS:1 ORDER BY CreatedDate DESC LIMIT 1 And I got back: 2017-08-31T18:16:17.000+0000
Salesforce
Answered Feb 27, 2023
·
9.2K Views
Read answer →
Lightning Message Service which can be used to exchange data between Visualforce, Aura Component and Lightning Web Components. Unlike the previous process, we don’t need to import any external library like pub or sub. Please refer this…
Salesforce
Answered Feb 27, 2023
·
729 Views
Read answer →