Posts

Showing posts with the label fields

Salesforce Fact #963 | Access formula fields from Create Records

Image
With the Winter'26 release, we can now access sobject fields from the Create records element without an additional Get records. This also works fine for local formula fields(not for cross object formula fields). This is similar to the Formulas.recalculateFormulas() function but doesn't consume any SOQL query. In this example, we have a formula field on case which calculates a date 10 days plus the Createddate. In the flow, we are creating a case record and referring the same field from the Create Record reference, it shows the value correctly. Reference:  https://admin.salesforce.com/blog/2025/improve-automation-with-winter-26-flow-features-be-release-ready Attached are the screenshots.

Salesforce Fact #887 | fields empty on LWC getRecords

Image
If the fields parameter in LWC getRecords is an empty array, then it returns no data neither it returns any error. It just skips the execution of the getRecords. Note: This is just a POC and ideally the fields array won't be empty. Attached are the screenshots.

Salesforce Fact #715 | Dynamic name fields using reactive screen components

Image
Another use case related to reactive screen components. Suppose, we have a screen flow where we are using the Name input type to capture user's name. Now, the name can consist of FirstName, LastName, MiddleName, informalname. Considering FirstName and LastName would always be provided we can dynamically specify the remaining fields to be captured using reactive feature. In this example, we have two checkboxes: one confirming the user has a middle name and one confirming the user has an informal name. Based on the selection made, the fields are formed dynamically and are rendered the same in the UI. Attached are the screenshots.

Salesforce Fact #676 | Get readonly fields in page layout using apex

Image
Using Metadata class methods, we can get the list of fields present in a particular page layout. Suppose we need to find out the list of ReadOnly fields in a page layout, we can get the same using a condition check on  Metadata.UiBehavior enum. It has three values: ' Edit ', ' ReadOnly ' & ' Required '. Reference:  https://salesforce.stackexchange.com/questions/179442/apex-metadata-api-layout-read-only-fields-being-added-as-read-write Attached is the screenshot.