ads

Sunday 23 June 2019

Roll Up Summary field filters in Salesforce

Roll up Summary fields in Salesforce. Note : Roll up summary field can only be defined on the master object. While your formula fields calculate values using fields within a single record, roll-up summary fields calculate values from a set of related records, such as those in a related list.

convert sObject to JSON String and JSON string to sObject using apex in Salesforce

Sample Code:

Account acc = new Account(Name = 'TestAccountName', AccountNumber = '234567', Industry= 'IT');

/* Code to convert Account to test string */

String strTest = 
Test .serialize(Acc);
system.debug('
Test String is ' + strTest );

/* Code to convert Test string to Account */

Account Acc1 = (Account)Test .deserialize(str Test , Account.Class);
system.debug('Account is ' + Acc1);