1

I have an action on which i have one Lookup Field "Year".Year is an object with only two records - 2015 , 2016.

I have this value to be predefined as 2016 when user clicks an action While creating a predefined value for this lookup , i tried putting directly 2016 just to check what happens as i am not aware how formula works. i got this EXPECTED error:

Formula result is data type (Number), incompatible with expected data type (Lookup(Sales Year)

Does anyone has any idea how i can acheive this/or i can i pass the id of record 2016 in the formula editor??

Thanks in Advance

3
  • Did you try using url parameters? You may need to override the standard New button with custom button and pass the default values as url paraneters. – javanoob Mar 14 '16 at 12:18
  • I am creating an standard action on Object.I dont think i can override – Samir Mar 14 '16 at 12:54
  • Can the lookup field just be adjusted to a picklist? You could use global picklists to ensure the same set of years across all places that you reference it – Brian Miller Apr 4 '19 at 22:34
-1

Please Refer to these documents-

How to Give Default value to a LookUp field in salesforce

http://www.datixinc.com/define-default-value-lookup-field-salesforce-com/

Hope it helps you.

1
  • 1
    That is URL Hacking and that we cant do in actions.We need to write the formula only to set predefined values and i guess it cant be achieve just with the formula.I think i need to create a hidden look up and using URL hack auto populate its value and then i can use it in formula in my action – Samir Mar 14 '16 at 13:27

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.