Skip to main content

I am trying to create a formula field to capture the 18-digit ID for the related account from a Task or Event. I have created the formula but I keep getting the error:

Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text

 

Here is the formula I have: 

 | OR(

 IF(

     BEGINS(WhatId, "001"), 

     CASESAFEID(WhatId), 

     NULL

 ),

 IF(

     BEGINS(WhatId, "003"), 

    CASESAFEID(Contact__r.AccountId),

     NULL

 ),

 IF(

     BEGINS(WhatId, "006"), 

     CASESAFEID( Opportunity__r.AccountId), 

     NULL

 )

 )

Thank you for any help!

 

Marshall

 

#Formula Help  #Formulas

3 件の回答
  1. 2024年11月26日 9:44

    Hello@Marshall Priest,

    Please try,

    IF(

    BEGINS(WhatId, "001"), CASESAFEID(WhatId),

    IF(

    BEGINS(WhatId, "003"), CASESAFEID(Contact__r.AccountId),

    IF(

    BEGINS(WhatId, "006"), CASESAFEID( Opportunity__r.AccountId),

    NULL

    )

    )

    )

0/9000