1
votes

I have simple 'after insert' trigger on a custom object to update picklist values. Based on some IF conditions I am updating picklist values which is perfectly working fine from webservice or manual insert from UI but when I write unit test case for it then it always return null for picklist values. Picklist values are dependent on Trigger execution after the record is inserted. I am not controlling picklist values. I am creating test data and it is returning values for all fields excepting picklist values. Do I need to set values explicitly?

1

1 Answers

0
votes

I can't tell for sure without seeing the code, but I might guess that you need to re-query for the records after you do the insert.