CRM Hangs when trying update Sage 300 customer

SOLVED

Upgrade from an old version of CRM to 2021 R2 Patch 2

Lots of stuff didn't upgrade properly.  All errors were resolved when we did the multi-step upgrades but it definitely did not go smoothly.

We have CRM running. We can look at a customer and we can see the new Sage web screens embedded within the tabs (like the Customer tab). Using the web screen we can update the Sage customer.

When we use the CRM screen to update the customer address CRM goes away to think and never comes back.

We log out of CRM.

Then we run a query against the CRM database: select * from Person and we are blocked by the update we just tried to run. CRM is trying to update the timestamp fields on a record in the Person table.

CRM address record was updated.

Sage was not.

If I update a CRM address for a company that is not connected to Sage I have no problems - the record is updated in the CRM database with no problems.

So I feel like the mechanism by which CRM is trying to push the update to Sage is failing.  Is that using the sdata feeds?  We have done the various tests and have confirmed that sdata says 'Hello World'.

Not sure where to go to next.

  • 0

    Do the CRM Logs give you any insight on what might be going on?

  • 0 in reply to Michele Gaw

    Unfortunately, nothing appears in any of the logs.

  • 0 in reply to Michele Gaw

    So CRM is starting a database transaction but then dies when trying to update Sage.

    There are no errors trapped by CRM and nothing is logged by CRM.

    There are no errors in Tomcat logs.

    I can't find any errors anywhere.

    We're going to try installing CRM on a brand new server and point it to a clean CRM database.  If that works then we'll point it to our upgraded database and see how it fares.

  • 0 in reply to Django

    I don't have an install of Sage 300 and I don't work directly with Sage 300 as I work with Sage 300 CRE.  Therefore, I don't know how CRM connects to 300.  However, since 300 is an SQL database, it seems like there should be "linked" tables in the administration area.

    It sounds like Sage CRM lost it's link to the 300 table for the address.  I am not sure if you can see these linked tables in the administration area and "resave" to refresh.  I am assuming that if you look in Advanced Customization-->Tables and Databases that you would be able to see the tables that you are trying to insert into.  If you edit and save, I wonder if it would fix the broken link.

    Perhaps someone that works with Sage 300 would have a better response.  I am working off the "theory" of how Sage CRM connects to databases.  :-)

    Hopes this helps.

  • 0 in reply to Michele Gaw

    Hi Michele,

      Thank you for your responses - I appreciate it!

      Alas, CRM pushes updates to Sage via an sdata connection or Tomcat connection (I think) vs a SQL connection.  If it were a connected server then SQL would return an error of some sort due to a failed connection or bad password (and I could solve that! :) ).

      The system health screen gives all green lights.

      We did find some references in some of the .js files that were looking for data that needed to go through a translation routine.  One of the .js files mentioned a field called AdLi_TypeARAddress which isn't found in the CRM database anywhere - neither in the upgraded one or a clean CRM install.

      Anyway - this install is a mess so we're getting a new server tomorrow to install CRM on and we'll point it at the clean database to see how it acts. Then we'll point it to the upgraded database. This will tell us if we have an installation/environment issue or if the issue is within the meta data inside the database.

    Wish me luck!

  • +1 in reply to Django
    verified answer

    Hi Django,

    I had the same problem with an old CRM install of 7.3 moving to CRM 2022 and Sage 300 2023.  I tried 7.3 -> 2019 -> 2022 and ran into all kinds of issues with CRM, like you described, and CRM integration.  I had to go 7.3 -> 2017 -> 2019 -> 2022.  It may be too late now but this worked for me.

    Have you tried synchronizing the Sage 300 tables??  I found that we could not do anything until this was successful.

  • 0 in reply to Django

    Yes, please let me know.  Based on your response, I believe you are running into the same issue I am encounering with the Sage CRM 2022 R2 upgrades.

    It is my understanding that there are a couple of ways to resolve the upgrade issue.

    1.  Do a complete uninstall and reinstall of Sage CRM 2022 R2.  (This would be similar to you installing on a new server.  Therefore, I think you will find success.)

    2.  Don't upgrade directly to Sage CRM 2022 R2.  Upgrade to CRM 2022 R1 first and then Sage CRM 2022 R2.

    I will be testing both of the above options on two separate upgrades this evening.  :-)

    If you find that you are still having issues after restoring your database and you are upgrading from a version older than 2017 R3, you may still find some issues in the database, if the 2017 upgrade was skipped over.  If that is the case, let me know, I think I have some scripts that would need to be run.  

  • 0 in reply to Michele Gaw

    In the end we had their IT create a new server (they are virtualized) just for CRM. We did a clean install against Sample Data - no problems. Then we connected CRM to the upgraded database and all manner of things were broken so we knew that the issue was centered around meta data in the database.

    In the end we re-did the upgrade and took CRM through each major revision instead of skipping any of the versions.  The Sage CRM Integration tool only seems to know how to upgrade from versions that it lists when you install/run the utility. So, going through each of these steps revealed that many of the upgrade steps had not been completed during the first go around and that by stepping versions one-by-one through the upgrade did whatever what necessary.

    The upgrade log files now had information that we could act upon (like changing ntext fields to nvarchar(max)).

    So, hopefully, , your upgrades went better.

  • 0 in reply to Django

    Thanks for the update!  Yes, the changing of ntext to nvarchar is one that I see most commonly missed.  You cannot skip the upgrade directly after 7.3.  They made a lot of changes between 7.3 and 2017 and they don't catch themselves up if you miss the 2017 upgrade.

    When upgrading to the latest version (Sage CRM 2022 R2), you are supposed to be able to go directly from 2019, 2020, 2021 directly to 2022 R2.  However, my recent experience with upgrades indicates this is not the case.  If you go directly from a previous version to 2022 R2 without first upgrading to 2022 R1, you will most likely encounter errors.  We also created another server and took 2019 to 2022 R1 and then onto 2022 R2 without issues.  We had previously taken that same database on its current server from 2019 to 2022 R2 and system health came back all red.

    Sounds like you hit that 2022 R1 upgrade by hitting every version so you were also good to go.  In the future, I will be upgrading to 2022 R1 before going to 2022 R2 in order to avoid issues with system health!  :-)