Skip to main content
We have a button/VF page for users to log a call which launches a flow and one of the things it does is looks up tasks that meet certain criteria and then stores the task's ID along with the task's owner ID. The flow then has a decision element where if the task ID variable from before is not blank and the task's owner ID variable is equal to a formula that is set to user ID it shows a warning that a call has been previously recorded. The step I'm having trouble with is the task owner ID and user ID. The flow is supposed to give the warning if task owner ID and user ID are the same except its not and I'm not sure why.

 

Flow: storing ID in a variable and then making a decision based on whether variable and current user ID are the same

 

User-added imageUser-added image
답변 1개
  1. 2019년 4월 21일 오전 9:13
    Hi Kimberly,

     

    When you will debug your flow, you will find the formula variable {!CurrentUser} will have 15 digit User Id and Task's WhatId will have value of 18 Digit User Id, so condition not matched.

     

    We should use CASESAFEID in user id formula

    {!CASESAFEID($User.Id)}

     

    Debug with current user formula value = {!CASESAFEID($User.Id)}

     

    Hi Kimberly, When you will debug your flow, you will find the formula variable {!CurrentUser} will have 15 digit User Id and Task's WhatId will have value of 18 Digit User Id, so condition not matched

     

    Debug with current user formula value = {!$User.Id}

     

    User-added image
0/9000