Apex · Salesforce

Apex Best Practices

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 be initiated by Web service requests and from triggers on objects. What you will learn?… Continue reading Apex Best Practices

Apex · Salesforce

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 be initiated by Web service requests and from triggers on objects. Apex basic best practices?… Continue reading Apex Best Practices – Basics (Episode 1)

Apex · Salesforce

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 <test.user@test.com>", "Cc": "Test User1 <test.user1@test.com,Test User2 <test.user2@test.com;Test User3 <test.user3@test.com;Test User4 <test.user4@test.com"… Continue reading STRING SPLIT WITH MULTIPLE SPECIAL CHARATER IN APEX

Apex · Salesforce

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 appropriate data type, i.e. String, Integer, etc. Once you have updated the JSON2Apex generated Apex class… Continue reading System.JSONException: Apex Type unsupported in JSON: Object

Apex · Salesforce

APEX ORIENTED OOPS (OBJECT ORIENTED PROGRAMMING)

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 a program by creating partitioned memory areas for both data and methods that can be used as templates for creating… Continue reading APEX ORIENTED OOPS (OBJECT ORIENTED PROGRAMMING)

Apex · Salesforce

DIFFERENCE BETWEEN VARIABLE AND 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 String'; //String variable declaration Integer myInteger = 1; //Integer variable declaration Boolean mtBoolean = true; //Boolean variable declaration Apex… Continue reading DIFFERENCE BETWEEN VARIABLE AND CONSTANT IN SALESFORCE APEX

Apex · Salesforce

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.   For example :-  Integer i; (Integer = Data Type, i = variable name). Local variables are declared with Java-style syntax. As with Java, multiple variables can be… Continue reading Variables in Apex