How to prevent users updating Notes in Salesforce?
To prevent users from updating Notes in Salesforce, develop a trigger on Note object and throw an error when someone tries to update the notes. Sample Trigger:trigger NoteTrigger on Note ( ....
To prevent users from updating Notes in Salesforce, develop a trigger on Note object and throw an error when someone tries to update the notes. Sample Trigger:trigger NoteTrigger on Note ( ....
Sample XML Code:<message><to>Magulan</to><from>InfallibleTechie</from><title>Welcome</title><body>Sample Message</body></message> XML Static Resource:Sample Apex Code:StaticResource objSR = [ SELECT ID, Body FROM StaticResource WHERE Name = 'Testing' LIMIT 1 ];String strResp = objSR.Body.toString();System.debug( ....
% cannot be used in Apex. But one should use Math.mod() instead.% is not a valid operator in Apex. So, use Math.mod() instead of % operator.Sample Code:Integer a = 10;Integer ....
To left align and set currency code in lightning datatable in Salesforce Lightning Web Component, use cellAttributes: { alignment: 'left' }. Please check the following sample code for reference. Sample ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled public static String createAttachment( Id accountId ) { String result = 'Success'; try { Attachment a = new Attachment(); ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled( cacheable = true ) public static List< Account > fetchAccounts( String searchKey ) { ....
Sample Code: List < Metadata.Metadata > layouts = Metadata.Operations.retrieve( Metadata.MetadataType.Layout, new List < String > { 'Account-Account Layout' } ); Metadata.Layout layout = ( Metadata.Layout )layouts.get( 0 ); for ....
The Transaction Finalizers feature enables you to attach actions, using the System.Finalizer interface, to asynchronous Apex jobs that use the Queueable framework. A specific use case is to design recovery ....
Sample Decimal Field: Sample Code: Apex Class: public with sharing class OpportunityController { @AuraEnabled( cacheable = true ) public static List < Opportunity > fetchOpptys(){ ....
Sample code: Apex Class: public with sharing class OpportunityController { @AuraEnabled( cacheable = true ) public static List < Opportunity > fetchOpptys(){ return ....