You need to sign in to do that
Don't have an account?
kim.stites
Opportunity LineItem Integration
I am integrating my ERP with Salesforce and we have all of our products loaded and active in Salesforce but how can I take the product code and attach it to the opportunity. The pricebook entryid table is empty.
If you're coding this yourself, you can do:
... Other similar mechanisms would probably work, too. This is just for example. Once you have PricebookEntry.ID, you can proceed with inserting your OpportunityLineItem records.
All Answers
You have to migrate the PricebookEntry values. This is what determines the default dollar amount for a product (because the same product might cost differently depending on whom you are selling to, pricing matrix, etc). If you have only one price, use the Standard Pricebook (select id from pricebook2 where isstandard = true). You can use zero to suggest to the user that they need to enter a price.
My question is how to take the product code field from the product as these are what are used in our ERP and then get the pricebookentryid so I can add the lineitem to the opportunity.
If you're coding this yourself, you can do:
... Other similar mechanisms would probably work, too. This is just for example. Once you have PricebookEntry.ID, you can proceed with inserting your OpportunityLineItem records.