Related To field is not editable in Salesforce
Related To indicates the record that the task is related to, such as an account or an opportunity. This field is available only when a user relates the task to ....
Related To indicates the record that the task is related to, such as an account or an opportunity. This field is available only when a user relates the task to ....
Sample Code: Apex Class: public class RelatedListController { @AuraEnabled public static RelatedListResult fetchRecs( String recId, String sObjName, String parentFldNam, String strCriteria ) { String strTitle = ' ('; List < sObject > listsObjects = new List < sObject >(); RelatedListResult obj = new RelatedListResult(); String strSOQL = 'SELECT Id FROM ' + sObjName + ' WHERE ' + parentFldNam + ' = '' + recid + '''; if ( String.isNotBlank( strCriteria ) ) strSOQL += ' ' + strCriteria; strSOQL += ' LIMIT 4'; listsObjects = Database.query( strSOQL ); Integer intCount = listsObjects.size(); if ( intCount > 3 ) { List < sObject > tempListsObjects = new List < sObject >(); for ( Integer i = 0; i <3; i++ ) tempListsObjects.add( listsObjects.get( i ) ); obj.listsObject = tempListsObjects; strTitle += '3+'; ....
Sample Code: String str = 'a,b,c,d,e'; system.debug( 'Count is ' + str.split( ',' ).size() ); Output:
In Lightning Experience, each user's Top Results page includes the objects they use the most. For new users or users that have little to no activity in Salesforce for over ....
String.join() method can be used to join list of strings with a separator using Apex in Salesforce. Sample Code: List < String > strList = new List < String > { ....
In order to make sure Service Resource is showing in the Field Service tab in Salesorce Field Service Lightning, add the Service Resource as Primary Member to a Service Territory.
Package.xml: <types> <members>ObjectAPIName.FieldSetAPIName</members> <name>FieldSet</name> </types>
In the below example, if the account type is Customer - Direct and if the user tries to update any fields other than Industry and Description, it will throw an ....
Sample Code: Lightning Component: <aura:component implements = "force:appHostable"> <aura:attribute name="myVal" type="String" /> <div class="slds-box slds-theme_default"> <lightning:inputRichText value = "{!v.myVal}"/> <lightning:button variant = "brand" label = "Show" onclick = "{! c.handleClick }"/> </div> </aura:component> Lightning Component Controller: ({ handleClick : function(component, event, helper) { var tempVal = component.get("v.myVal"); var tempDivElement = document.createElement("div"); tempDivElement.innerHTML = tempVal; alert( "With HTML Tags " + tempVal ); tempVal = tempDivElement.textContent; alert( "Without HTML Tags " + tempVal ); ....
When a query has to return more data, Salesforce uses Query Locators. In order to understand more about this, check the following link:http://www.infallibletechie.com/2018/10/what-is-query-locator-in-salesforce.html Reasons may be following for the exception1. ....