An error has occurred in a CRM .net customisation. Please contact your vendor to resolve.

On Sage 300 2019 PU1 and Sage CRM 2018 R3.

Within the Sage 300 Administration it allows me to Synchronise Tables and completes that without an error. However, when trying to import customers I get

"An error has occurred in a CRM .net customisation. Please contact your vendor to resolve"

If I try to "Promote to Sage 300", when I have entered a Customer Number that doesn't currently exist and then click Promote to Customer, the screen eventually appears with the Sage 300 Customer web screen, but the customer information then has to be manually put in and then saved.

I am using the Admin user with full rights, and I have allowed Admin WebAPI access. Updating customer information also works going from Sage 300 to CRM.

Any ideas would be appreciated.

Thanks in advance

  • 0

    Is this within a .NET assembly that is part of the integration or are you using your own .NET assembly or one supplied by a 3rd party?

  • 0

    Its the one that is part of the integration.

  • 0

    If you turn .net logging to 5 doesn’t anything get logged in the .net log?

  • 0

    This is the final few entries on the .net log report when at 5. If you need the rest of the log please let me know:

    Mar 20 2019 15:30:03.893 4200 4232 1 Class: CRMWrapper - Method: ExecWebPageNew - Error: An error has occurred on PreBuildContents or BuildContents

    Mar 20 2019 15:30:03.940 4200 4232 5 StackTrace:

    Error: [SafeCall Exception]: SQL Error

    Server stack trace:

    at Sage.CRM.Wrapper.IeWareQuery.SelectSql()

    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)

    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:

    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

    at Sage.CRM.Wrapper.IeWareQuery.SelectSql()

    at Sage.CRM.Data.QuerySelect.ExecuteReader()

    at Import.ImportPage.AddPersonInfo(Int32 personId, String contactName, Record companyRecord, String type, String locationId, String locationDesc, Boolean mainContact)

    at System.Dynamic.UpdateDelegates.UpdateAndExecute8[T0,T1,T2,T3,T4,T5,T6,T7,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)

    at Import.ImportPage.ImportEntity(Object entity, Boolean isCustomer)

    at CallSite.Target(Closure , CallSite , ImportPage , Object , Boolean )

    at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)

    at Import.ImportPage.ImportEntities(String option, String& webapimessage)

    at Import.ImportPage.BuildContents()

    at Sage.CRM.Wrapper.CRMWrapper.ExecWebPageNew(String fullFileName, String callFunction)

    Mar 20 2019 15:30:03.940 4200 4232 5 Unloading Domain

    Mar 20 2019 15:30:03.940 4200 4232 5 NET - BASE RELEASE CORE INTERFACES

    Mar 20 2019 15:30:03.940 4200 4232 5 Metadata Unload.

    Mar 20 2019 15:30:03.940 4200 4232 5 Keys Unload.

    Mar 20 2019 15:30:03.940 4200 4232 5 UserSession Unload.

    Mar 20 2019 15:30:03.955 4200 4232 5 Dispatch Unload.

    Mar 20 2019 15:30:03.955 4200 4232 5 Unloading WebPage

  • 0

    That seems to indicate a sql error. Can you post a snippet of the sql log at the same time.

  • 0

    Apologies for the delay, here is 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

  • 0

    Thanks very much for directing me at the ewaresql log Daniel. Reading it I worked out that I needed to change the Data Type for Capt_US and Capt_UK from ntext to nvarchar(MAX) and the import then worked.

  • 0

    Great work! Glad I could help in some way.

  • 0 in reply to Daniel Lewis

    How does one do this "turn .net logging to 5"

  • 0 in reply to Peter Maina

    In Administration, click on System --> Logging and click the change button and set the value in .Net logging to "5 - Maximum".