function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Comparing One field value against one custom object



I want to compare field value against a custom object record.


I have one field which contains a code of the product and a custom object which contains active product code.


when user enters the code in the field I want to check whether the product enter is valid or not.if not then set that field value to Product not supported.


For example if user enter 1111 and custom object has one record with 1111 then its ok but if not found than place Product Not Support.


I created one Map with <Id,String> and one Set<String> this holds the unique product code. now I queried the custom object and store the value in Set<String>.


Now when I m trying to compare based on filter set its not working for me can anyone help.





Not sure if this would be of help but take a look at the Vlookup function in the validation rule.