4

I have a global picklist that I use for a reference object. When a record is created it queries this reference table and populates a different object that functions as a warehouse with the value from the picklist.

If I change the global picklist will it fire the triggers that the global picklist is assigned to? Because if I update that reference table, it needs to update the warehouse. If the picklist doesn't fire the trigger then when I go to update the warehouse my OldMap won't sync up with the values in the warehouse.

So will a trigger fire if I change the picklist? I just tried it and it didn't but I'm not sure if I set it up correctly to log it.

Outside the scope of this question, if it does not update, one thing I could do is add an ID to the warehouse then manually update affected records.

3

interesting question and I just gave it a test.

change in global picklist value (both label & api name) is NOT triggering the object trigger where a picklist field uses the global picklist set , thou the values in the objects picklist field gets changed with the new value.

we can argue either side to run the trigger or not to run the trigger..

thou you are changing the picklist value (its more like renaming in most cases e.g changing the picklist text from YES to TRUE - but the intent is not going to change). then there is no point in triggering the change and its just enough to reflect the renamed value.

| improve this answer | |
  • Looks like I'll have to do the ID method in the warehouse because I won't be able to compare against the "oldmap". That said it doesn't change the implementation too much. In fact it may simplify it. However, if I change a value in that picklist I'll need to change it in the warehouse lookup table to fire the trigger – tjcinnamon Jun 30 '17 at 19:15
  • i guess ur end object is having a lookup to the reference object. y can't you use a formula field to get the picklist value from this reference object ? that way it will always have the latest value. – Vamsi Krishna Jun 30 '17 at 19:19
  • 1
    Good question. 2 reasons: 1)Tableau can't read SFDC formula fields 2) "other" as a category for a dependent picklist. The warehouse accommodates "other" as free text. The dependent picklists are a guide and will work 90% of the time. If they don't the user can select other and put in what they want – tjcinnamon Jun 30 '17 at 19:32
  • 2
    @tjcinnamon Note that this is also true even for non-global picklists, as well as certain other mass updates. Always check the documentation for a particular administrative action to see if triggers will fire (they usually don't). – sfdcfox Jul 1 '17 at 0:42
  • Would this work if it is check box instead of pick list? – user48375 Aug 18 '17 at 19:43
1

Global picklist is nothing but a reusable picklist values which can be used in multiple picklist in multiple objects.

If you change picklist values in configuration it will not fire trigger.

Once the record get saved with previous picklist value, the value will still be exist on the record, even if new value doesn't match with record's picklist value.

Changing the picklist value in record creation/update will definitely fire trigger if you have correctly written the conditions.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.