I created an Opportunity Action, using the OpportunityLineItem
as the Target Object. I want to set a Predefined Field Value for the field PricebookEntryID
. When I add a new predefined value, select the lookup field (Price Book Entry) and set the formula to '[some-pbe-id]'
, I end up with this error (which makes sense):
Error: Formula result is data type (Text), incompatible with expected data type (Lookup(Price Book Entry)).
How can we set an ID using the formula editor? I read that it is now possible in Winter14.
You can now predefine values for lookup and master-detail fields.
Thanks,
Best Answer
While lookup and master-detail fields are supported, this is only in terms of being able to reference a value from another field. So I have a scenario where an account can only have opportunities with a specific pricebook, so I have populated a lookup to the pricebook on the account object. I can then predefine the pricebook on a "new opportunity" publisher action with the following formula:
Unfortunately you can't pass in the id of a specific record as a literal.