Posts

Showing posts with the label field value

Salesforce Fact #913 | Access selected record field values in screen flow lookup w/o Get Records

Image
Suppose we are using the Lookup element in the screen flow and once a record is selected, we would like to get the value from other fields. Now, Lookup provides record Id and record Name field values by default. So in order to get the other field value we need to use a Get Records. But hold on! There is an option to get the field values without using a Get Records element. We need to define a child sobject variable and then in the advanced section, set the parent field Id with the record Id of the selected record in Lookup. In this example, we have a lookup of Account record and we are using a Contact record variable and setting the AccountId field with the selected record Id and later on accessing the field values from account. Attached are the screenshots.

Salesforce Fact #846 | Detect field value change in LWC

Image
Suppose we have a use case where we need to detect the change of a particular field value and need to refresh the record detail page.  We can make use of LWC getRecord() and getFieldValue() functions to implement the same. In this example, we have a LWC which is added to the Lead record detail page which refreshes the page when there is a change on Title field value. Reference:  https://salesforce.stackexchange.com/questions/386377/how-to-track-change-on-an-account-field-in-lwc Attached is the screenshot.