I would like to add ONE default product to every opportunity using JavaScript.
I am not using price lists and automatically set a dormant price list when the "topic" field is completed - so there are no worries on that front.
My idea was - onsave of the opportunity, verify that the default product was added to the product line items, and if not add it. I haven't been able to find any resources on how to add a new product to the opportunity product list using JavaScript. I have a little experience using the REST Kit, but I cant seem to get the value of opportunityid - and do I even need it? I assumed I could access the opportunity product entity using the opportunityid?
I would be really happy for any suggestions.
Thanks