Posts

Showing posts with the label nullcheck

Salesforce Fact #811 | Careful with map with null value in VF page

Image
We need to be careful while accessing map in VF page. If any of the value in the map needs to be null, we should use '' instead of NULL, else it will throw the error: Map key <corresponding key> not found in map. Attached are the screenshots.

Salesforce Fact #633 | Flow: Check of target collection is empty after filter

Image
While using collection filters in flow, if we need to check whether the target collection after the filter is empty, isNull operator does not work. Because an empty target collection after the filter has the value as []. So, we can create a dummy blank collection filter.  In this example, we have a collection filter on a list of account records. Now, in order to check the target collection is empty or not we are comparing it with a dummy blank collection filter. Attached are the screenshots.