Use a Toggle and Flow to Escape Validation Rules | How I Solved This

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 23

  • @salesforcegio6003
    @salesforcegio6003 Місяць тому

    Thanks for sharing. I was having trouble with a flow when trying to update a record that has a validation rule in it. I was able to implement this in my org, and it also works when getting a collection in the Get Records, it just needs some adjustments, but it works!

  • @kevinscully5056
    @kevinscully5056 Місяць тому

    Simple but clever. Thank you.

  • @ashwathdeshpandem544
    @ashwathdeshpandem544 2 роки тому +4

    Nice idea, if a flow needs to deactivated temporarily at org level or for specific profile/user, we can use hierarchy based custom setting in a formula like toggle

  • @ismarjoaquinduran8124
    @ismarjoaquinduran8124 2 роки тому

    Amazing! Thanks for the solution!

  • @jyothimakam9343
    @jyothimakam9343 2 роки тому

    Amazing simple magic.Thanks a lot

  • @dhruveshsingh67
    @dhruveshsingh67 2 роки тому +2

    My favorite😍salesforce

  • @hilalfaiz4812
    @hilalfaiz4812 2 роки тому

    In terms of order of execution, shouldn't this be a problem? Since validation rules are executed before flows, shoildnt the validation rule still throw the error?

    • @maxjones616
      @maxjones616 2 роки тому

      I don't think so, because at the time the Validation rule runs, the flow updating the related record hasn't made any changes yet. This is my understanding of the events
      A new Camp Activity is created and saved -> Validation rules will fire, but no changes have been made to a Camper Credit yet -> the flow will run, and update the related Camper credit record -> Validation rules will fire for the Camper Credit record, but will not give an error because of the toggle.

  • @protyaybhowmick2745
    @protyaybhowmick2745 2 роки тому

    How to execute validation rule instead of bypassing it before flow execution?

  • @emajhugroo109
    @emajhugroo109 2 роки тому

    Thank youuu😍

  • @LorenzoAlali
    @LorenzoAlali 2 роки тому +3

    Creative hack, thanks for sharing!

  • @trekvdm
    @trekvdm 2 роки тому +3

    I would have recommended using Session based permission set.

    • @ameensams
      @ameensams 2 роки тому +1

      Why?

    • @cadillacben
      @cadillacben 2 роки тому

      Session based permission set is cool, but how do you get around mixed dml? Once you activate the permission that's a setup change, so you're stuck.

    • @suvassantra3214
      @suvassantra3214 2 роки тому

      @@cadillacben a lot more work you have received your

    • @suvassantra3214
      @suvassantra3214 2 роки тому

      @@cadillacben a lot more work you have received your

    • @suvassantra3214
      @suvassantra3214 2 роки тому

      @@cadillacben l