Showing results for 
Search instead for 
Do you mean 

Update product from existing opportunity

New Member
Posts: 9
Country: Philippines

Update product from existing opportunity

How can I update existing product from opportunity?

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Update product from existing opportunity



Please could you provide more information, I'm not sure what exactly you're asking for.


Are you trying to do something through our development kit, or are you just using Act! as normal?


Kind regards,




Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Copper Super Contributor
Posts: 485
Country: Australia

Re: Update product from existing opportunity

Hi Sam


I am trying to do this now as well, i have the code for an opportunity basic, looking to add to it product and company



            // This example creates an Opportunity and then populates several of the Opportunities fields.
            // The Opportunity Variables
            OpportunityStatus oStatus = OpportunityStatus.Open;
            int iProbability = 50;
            DateTime dEstCloseDate = System.DateTime.Now.AddDays(15);
            Boolean bMakeItPrivate = false;
            string sName = "TEST Annuity";

            ContactList cList = Act.UI.ActApplication.Instance.ActFramework.Contacts.GetContacts(null);
            Contact cContact = cList[0];

            Guid[] gArray = new Guid[1];
            gArray[0] = c.ID;

            //Process[] pProcess = StageManager.ActiveProcesses[];
            Stage[] sStages = Act.UI.ActApplication.Instance.ActFramework.StageManager.Processes[0].Stages;
            Stage oStage = sStages[5];

            // Opportunity Products
            ProductList pList = Act.UI.ActApplication.Instance.ActFramework.Products.GetProducts(null);
            Product pProduct = pList[0];

            // Opportunity Variables used after its ceated
            string sReason = "Annuity policy has been linked to " + c.FirstName + c.LastName + " at and linked to either an ASA or Code.";
            DateTime dOpenDate = System.DateTime.Now;

            // Call to create opportunity
            Opportunity oOpp = Act.UI.ActApplication.Instance.ActFramework.Opportunities.CreateOpportunity(sName, oStatus, oStage, dEstCloseDate, bMakeItPrivate);
            oOpp.Probability = iProbability;
            oOpp.Reason = sReason;
            oOpp.UpdateContacts(gArray, null);
            oOpp.UpdateProducts(pList[5], pList[0]);

            // Call to add Product
            // OpportunityProduct oProd = Act.UI.ActApplication.Instance.ActFramework.Products.OpportunityProductManager.CreateCustomEntity();
            // oProd.Name = "";
            // oProd.Quantity = 1;
            // oProd.Cost = 0;
            // oProd.Price = 1;
            // oProd.Discount = 0;
            // oProd.SetOpportunities(Act.UI.ActApplication.Instance.ActFramework.Opportunities.GetOpportunityAsOpportunityList(oOpp));
            // oProd.Update();

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Bronze Elite Contributor
Posts: 2,119
Country: United_Kingdom

Re: Update product from existing opportunity

//Associate newly instantiated OpportunityProduct CustomEntity to an existing Product
// This is only a guess I haven't tested this!
oProd.ProductID = pProduct.ID; .... //Associate Opportunity to Company. Long winded! Company c = oFram.Companies.GetCompanies(null)[0]; c.SetStaticOpportunities(oFram.Opportunities.GetOpportunityAsOpportunityList(oOpp);
Vivek Gargav
Caldere Associates Ltd.
My Blog
Posts: 467
Country: United States

Re: Update product from existing opportunity

Checking with my opps expert, get back soon.

Posts: 467
Country: United States

Re: Update product from existing opportunity

Ok, it looks good, dev answered as follows:


"it will tie the opportunity product to the product from the master product list as desired"