Sage CRM Integration between Sage 300 2019 and Sage CRM 2018 R3

This question has suggested answer(s)

Hi

Im having an issue Synchronising tables in CRM.  When I choose to Synchronise I get:

Error Code: Unauthorized, Error Message: Sage 300 WebApi Authentication error from invalid credentials.

I have set the CRM user up with a security group that has access to Sage 300 Web API in Sage 300.  I have also changed the web.config files so admin has access to the WebApi and tried using it with the ADMIN user and getting the same issue.  Does anyone have any other ideas?

Thanks

All Replies
  • Hi Steve,

    Here are few tantrums may help you:

    1.  Metadata refresh

    2.  Make sure you have portal setup in Sage 300

    3. Try putting sage 300 user password in upper case from the CRM interface.

    4. Go to IIS -> Sites -> Select Your Sage CRM directory -> Open Authentication -> Enable Windows Authentication

       Restart IIS may be required.

    5. If not given, you also have to give each Accpac security group to Web API as shown in the screen below.

    6. If not defined in the SAge300 …\Online\Web and …\Online\WebApi folders you will find web.config files. These files have a new element specifically for the ADMIN’s use in the Web API. The element “AllowWebApiAccessForAdmin” by default is false and must be set to true for the ADMIN user to be able to use the Web API. For a normal user, you would simply grant access to the “Sage 300 Web API” security group for the module’s endpoint in the Web API that you want to access (i.e. AP, AR, GL, etc.). But for the ADMIN user who is not bound by security groups, the element in the web.config files must be set to true. And, following the setting of this element to true, simply re-start IIS for access.

    Let us know if any of this works for you.

    Cheers !

    Sharad

  • Thanks Sharad.  I had done all the above, or at least I thought I had.  It looks like it was a password case issue which I was aware of but obviously didn't check properly.  I must have had enough by Friday afternoon last week!  Thanks for your help.

  • Following on from the above, the CRM Synchronises correctly, however if I try to Import Customers, I get "An error has occurred in a CRM .net customization. Please contact your vendor to resolve".  If I try to import from A to A, it completes the process stating No Customers to Import, but any criteria where a customer would exist, I get the error.

  • Hi Steve,

    This is exactly what I get.

    sometimes I can import a from and to customer range as long as it is not too big (100-150 records)

    But this is not always the case, after a couple of imports I then get the above message that you get & it will not go away.

    Did you find out what was causing this problem

    I am using CRM 2018R3 and S300 v2019

  • Hi Ian

    I was getting errors like this in the ewaresql log:

    Mar 20 2019 15:29:51.896 4200 4232 1 fqopen,time,sql,errormsg 125 SELECT Capt_UK FROM Custom_Captions WHERE Capt_Family='pers_salutation' AND Capt_deleted IS NULL AND UPPER(Capt_UK) = 'ADRIAN'

    Argument data type ntext is invalid for argument 1 of upper function

    Mar 20 2019 15:29:58.221 4200 4232 1 fqopen,time,sql,errormsg 78 SELECT Capt_US FROM Custom_Captions WHERE Capt_Family='pers_salutation' AND Capt_deleted IS NULL AND UPPER(Capt_US) = 'ADRIAN'

    Argument data type ntext is invalid for argument 1 of upper function

    I changed the Data Type of Capt_UK and Capt_UK in the Custom_Captions table to nvarchar(max) and it worked.

    This may not be the same as your issue, as I was getting the error every time, even if I was trying to import just 1 customer.

  • Hi Steve,

    I was checking the range I was doing and looked at the individual codes in that range and I found that there were some customers that had special characters in the code - if I went up to the one before that code, it went through, and then started after that, then my records would import.

    I then went into Sage 300 and made a change to that customer (the one with a special character) and saved it, and it created the record in CRM - so it did not complain when I did it that way - only on the mass import.

    Well I hope this helps other people that have this same problems

    Thanks