You need to sign in to do that
Don't have an account?
Venk_ModelMetri
Question about the Opportunity Record - Relationship with Products & Schedules
We are thinking about writing a Java Batch process that will read the opportunity records and update them. While updating, is it possible for us to delete and add the products associated with that opportunity in Products (Standard) section of an opportunity. Also, how would you add the newly created products to a schedule automatically ?
Does the API support this?
Thanks
Venk
Hi Venk,
Products are added to opportunities view OpportunityLineItems. A line item is created and the opp id is set to the opportunity you are adding the product to, the product id is set to the appropriate product.
The product table can be fully manipulated from the API (Add, update delete).
Dave,
Thank you so much. I am looking at the OpportunityLineItems object and its seems like a perfect fit. Just to make sure that I understand this correctly.
When I have an opportunity object in my java program, can I acess the OpportunityLineItems by saying something like opportunity.getOpportunityLineItems ? (If not, how I get the OpportunityLineItems associated with the current opportunity record.)
Similarly, when I do a an update opportunity call, will the OpportunityLineItems associated with the opportunity automatically get updated or would I have to make another call for that?
Thanks
Venk
Hi Venk,
You would query for OpportunityLineItems by using a query like "Select Id From OpportunityLineItems where OpportunityId = '00300000JJCK'".
The line items and opportunities are updated independently.
Dave,
When adding a product (OpportunityLineItem) and associating it with an opportunity, our requirement is that we should also add it to the schedule automatically (opportunityLineItemSchedule).
If a product has a default schedule already enabled, should we make any extra call to opportunityLineItemSchedule or does this happen automatically?
How will the query be like (just to get a feel for it) if we have do this explicitly ?
Thank You
Venk