Community
Showing results for 
Search instead for 
Do you mean 
Reply

How to move an OppProduct from one Opp to another Opp?

Copper Contributor
Posts: 123
Country: Canada

How to move an OppProduct from one Opp to another Opp?

[ Edited ]

With a created OpportunityProduct should I not be able to move it from one Opportunity to another Opportunity using the SDK?

prod.SetOpportunities(OppList);

prod.Update();         

When I hit prod.Update() I get an error saying can't save product.

Why won't this work? Is there a work around?

Would like to do this without haveing to recreate the product on the newOpp if possible.

Copper Contributor
Posts: 136
Country: USA

Re: How to move an OppProduct from one Opp to another Opp?

Remember that opp is a list.

Try this:

 

prod.SetOpportunities(ACTFM.Opportunities.GetOpportunityAsOpportunityList(OppList))

Thanks,
Inge van Gemert
ACT! Certified Consultant
The Netherlands
inge@inkey.net
Copper Contributor
Posts: 123
Country: Canada

Re: How to move an OppProduct from one Opp to another Opp?

Hey thanks for your input.

I do pass in an OpportunityList to SetOpportunities.

It seems like that only works if the OpportunityProduct hasn't been previously saved.

At least that is what I see on the database I've been working with.

I wish it was as easy as that!  Unless there is something else I'm doing fundametally wrong.

Thanks though!

-Eric

Copper Contributor
Posts: 123
Country: Canada

Re: How to move an OppProduct from one Opp to another Opp?

Also we're using ACT 2013 Premuim Version 15.1.108.0 English (Canada) if that makes any difference.

It seems it should work but only seems to work when I'm creating a new OpportunityProduct.