back to top

Unable to Win Opportunities for Some Records in the Saleslogix web client

We recently ran into a client issue that I have just reported to Swiftpage as a bug (Ticket 8010151686)

This applies to all Saleslogix web clients, including version 8.1.

When you win an opportunity the opportunity products get copied to assets with ACCOUNTPRODUCT.OPPORTUNITYID and ACCOUNTPRODUCT.OPPPRODUCTID populated based on the source records.

If you later delete that opportunity the corresponding assets keep the values in these two fields even though those IDs are no longer valid. 

When attempting to close (win) another opportunity at the account that now has these bad asset records you receive an error on the close opportunity dialog due to the NHibernate AccountProduct.Opportunity mapping being invalid.

Steps to reproduce:

  1. Create an opportunity for any account with one product.
  2. Close win the opportunity.
  3. Verify the Asset now exists.
  4. Delete the Opportunity.
  5. Create a new opportunity for the same account with at least one product.
  6. Close win the second opportunity.  On the close dialog you will get an error and are then unable to win any further opps for this account until the bad IDs are removed from the ACCOUNTPRODUCT table

You can fix this by running a SQL statement of **boilerplate warning: do this in a test system first**:

update sysdba.accountproduct set opportunityid=null where opportunityid not in (select OPPORTUNITYID from sysdba.opportunity)

update
sysdba.accountproduct set oppproductid=null where oppproductid not in
(select oppproductid from sysdba.opportunity_product)

Even better would be a custom Post Execute Step OnBeforeDelete entity event at the Opportunity.  Something like this should work **boilerplate warning: written for this blog and not tested**:

            if(opportunity!=null && opportunity.Account !=null)
            {
                foreach(Sage.Entity.Interfaces.IAccountProduct ap in opportunity.Account.AccountProducts)
                {
                    if(ap.Opportunity == opportuinity)
                    {
                        ap.Opportunity = null;
                        ap.OppProductId = null;
                        ap.Save();
                    }
                }
            }

 You would also need a custom  OnBeforeDelete entity event at the OpportunityProduct.  Something like this should work **boilerplate warning: written for this blog and not tested**

            if(opportunityproduct!=null && opportunityproduct.Opportunity!=null && opportunityproduct.Opportunity.Account !=null)
            {
                foreach(Sage.Entity.Interfaces.IAccountProduct ap in opportunityproduct.Opportunity.Account.AccountProducts)
                {
                    if(ap.OppProductId == opportunityproduct.Id.ToString())
                    {                       
                        ap.OppProductId = null;
                        ap.Save();
                    }
                }
            }

          

 

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Kris Halsrud
Kris Halsrud
Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Infor CRM SLX 10.0: Delegate Ownership Changes for “Everyone” Records

Learn how the new EveryoneOwnerAssignment secured action in Infor CRM SLX 10.0 allows designated users to change ownership of Everyone-owned records without requiring Administrator access.

Related Articles

Infor CRM Sync for Exchange: Action Required by August 31, 2026

Using Infor CRM Sync for Exchange with Microsoft 365? Your Exchange administrator must update tenant settings by August 31, 2026 to prevent sync disruption.

[Webinar] What’s Coming Next for Infor CRM SLX and Why v10 Matters

See what’s coming next for Infor CRM SLX, including new marketing workflows, automation improvements, and reasons to consider upgrading to v10.

Disable Caching in Infor CRM SLX Web Client

In the rare case caching is causing issues in the Infor CRM SLX web client, it is possible to disable specific types of caching by making edits using Application Architect, and then deploying.

Exploring AI Options for Infor CRM v10

I've started taking a closer look at the AI capabilities built into Infor CRM v10. Over the next several posts, I'll share what I learn. From the built-in features and supported AI providers to implementation considerations, costs, and practical use cases.

Related Videos