Apex Best Practices
Information About Apex Programming Best Practice Salesforce Apex is programing language for custom development. Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Lightning platform server in conjunction with calls to
Apex Best Practices – Basics (Episode 1)
Salesforce Apex is programing language for custom development. Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Lightning platform server in conjunction with calls to the Lightning Platform API. Apex code can
STRING SPLIT WITH MULTIPLE SPECIAL CHARATER IN APEX
Just experienced issue to split the string value, one of API integration where JSON string attribute contains the many special character that I need to split and reorganize the value then store the value in salesforce field. Example: JSON Response { "To": "Test User
System.JSONException: Apex Type unsupported in JSON: Object
The Salesforce JSON.deserialize(String, Type) method cannot deserialize from JSON into generic Object, or into objects with generic Object fields. You can deserialize into concrete types such as “String” or “Integer”. If you have defined your field types as Object, e.g. public Object error, you need to replace Object with the
SPRING 21 – ACCESSING CUSTOM METADATA TYPES RECORDS FROM APEX
In Spring 21 pre release, new methods introduced for Custom Metadata Types as like Custom Settings. Following Methods getAll() – Will return the all records from Custom Metadata Type. Before Spring 21: list<Test_mdt> lstMetaDataRecords = [Select Id, MasterLabel from Test_mdt] In Spring 21: Map<String, Test__mdt> mapMetaDataRecords =
How to convert Set Id to Set String in Apex code?
Apex code is not supporting converting set to set direct way – we have to do workaround – Set<Id> ids = new Set<Id>{'001G0000023lIWq','a61G0000000TOSE'}; Set<String> idStrs = (Set<String>)JSON.deserialize(JSON.serialize(ids), Set<String>.class); System.debug('idStrings=' + idStrs);
APEX – LOOPS
Learn in Detail About Salesforce Apex Loops And Types of Loops Loops are used when a particular piece of code should be repeated with the desired number of iteration. Apex supports the standard traditional for loop as well as other advanced
APEX ORIENTED OOPS (OBJECT ORIENTED PROGRAMMING)
Apex Oriented OOPs (Object Oriented Programming) in Salesforce Before going to do coding in apex once recall the basics of object oriented programming (OOP) language concepts. What is OOPs :- OOP (Object Oriented Programming) is a methodology, that provides a way of modularizing
DIFFERENCE BETWEEN VARIABLE AND CONSTANT IN SALESFORCE APEX
Learn Difference Between Variables & Constant in Salesforce Apex Variable :- Variable value can be change any time. it cant be fix. How to declaring Variables :- You can declare the variables in Apex like String and Integer as follows − String strName = 'My
Variables in Apex
Learn How to Declare Null Variables & Initial Value Variables in Apex As already we discussed about Apex language that is a strongly typed language so we have to declare all variable before they are referenced in Apex coding. As general when we declare variables we have to declare data type followed by variable name.