+ Start a Discussion

Need help with Quote Line items Trigger!

Hello!  I know that this seems like amateur hour everytime I post something, but I am struggling with something.  I need to always have the same product stamped onto my quote line items.  The need is because I have data coming from another system and there are far to many products to add into salesforce, so I am adding those names into a text field on the line items.  But, I need to have the lookup populated.  This needs to happen when the record is created.  Has anyone ever run into this use case?

Actually , you need to relate two objects via lookup field . And yes ,lookup field can be populated inorder to maintain relationship via triggers . For this , you need to pass Record Id into lookup as lookup field are expecting Ids only .

Also ,if products are not in the sfdc (rather they are coming from other application) then you cant add them directly into lookup(becoz, at sfdc there is no record id ) .So ,you need to first insert all these product in sfdc then you can refer that producst record Id into the lookup field at quote line items .

Well how it should work is as follows.


Quote is created


Line item created

custom field is populated 

Lookup (product2) is populated by 1 id that is used for all products (one product for the org)

lookup is hidden from page layout.

Chris HarrellChris Harrell
Kevin, Did you get a solution to your problem? I have a similar issue where I need users to have the ability to upload custom products directy to the quote (quote- line items) Any suggestions ?