Posts

Showing posts from March, 2026

Salesforce Spring '26 Release High level points

1. Enhanced Apex Functionality Apex Async Limit Increase : Salesforce has increased the async apex limits , allowing for more complex asynchronous processes without hitting limits. This is crucial for large-scale batch operations and long-running tasks. Apex doTearDown : A new doTearDown method is available in Apex test classes. This allows for better test management by performing clean-up actions after the test method is executed. 2. Improved Data Security & Privacy Dynamic Data Masking : The Spring '26 release includes improvements in dynamic data masking for non-admin users , helping companies comply with privacy regulations and protect sensitive customer data. Shield Platform Encryption : Enhanced capabilities in Platform Encryption , allowing encryption of more objects and fields to improve security compliance, especially for sensitive data. 3. Salesforce Functions (Beta) Salesforce Functions now supports better integration with external APIs , al...

Fetch record type-specific picklist values directly in Apex

In Spring ’26, you can fetch record type-specific picklist values directly in Apex using the new  ConnectApi.RecordUi.getPicklistValuesByRecordType(objectApiName, recordTypeId)  method. This eliminates the need for complex, manual UI API callouts, providing cleaner code to get all picklist fields, dependent picklists, and default values for a given record type.   Example - Id accrecordTypeId = Schema.SobjectType.Account.getRecordTypeInfosByDeveloperName().get('Test_RT').getRecordTypeId(); ConnectApi.PicklistvaluesCollection result =  ConnectApi.RecordUi.getPicklistValuesByRecordType('Account', accrecordTypeId); for(ConnectApi.PicklistValue pv: result.PicklistFieldValues.get('Rating').values){     system.debug(pv.label + ' '+pv.value); }