Posts

Showing posts with the label lookup

Salesforce Fact #924 | Updating multi select lookup using screen action

Image
Suppose we have a datatable and multiselect lookup in screen flow. Now, whatever records are selected in the datatable should get selected in the lookup component. For this, we can make use of screen action. We can create a subflow which would take the list of selected records and extract the ids using a transform element and return those to the main flow. The returned ids can be selected as the input of the lookup. This would work instantly. In this example, we have an account lookup which is updated with the selected records of the datatable. Attached are the screenshots.

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 #613 | Screen flow: Relate multiple contacts for an account

Image
Many times we need to relate an account with multiple existing contacts. We can create a screen flow with a contact lookup element to achieve this. Attached are the screenshots.

Salesforce Fact #608 | Add multiple users in public group using lookup in screen flow

Image
Many a times we need to add multiple users in public groups. We can definitely do that using the OOTB options. We can create a screen flow with multi select user lookup to achieve the same as well. Attached are the screenshots.

Salesforce Fact #603 | Search undefined... in screen flow lookup

While using Lookup component in screen flow, sometimes we see that the placeholder text on that field shows Search undefined... instead of the Search <ObjectName>. The reason for this is the lookup field is not added to the page layouts of the source object which are assigned to running users. Reference:  https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_screencmp_lookup.htm&type=5