5

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.

Source: http://docs.releasenotes.salesforce.com/he-il/winter14/release-notes/rn_186_chatter_new_mdp_predefined_field_types.htm

You can now predefine values for lookup and master-detail fields.

Thanks,

5

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:

Account.Price_Book__c

Unfortunately you can't pass in the id of a specific record as a literal.

2
  • What about the Price Book Entry field? It sounds impossible to use, considering we can't build custom lookups to the PricebookEntry object. – jpmonette Jul 29 '14 at 13:19
  • 1
    You are correct - it doesn't seem very useful. I expect this feature has been enabled for all lookup/master-detail fields regardless of whether its actually possible to use it. – Bob Buzzard Jul 29 '14 at 14:49

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.