0 Replies Latest reply: Feb 15, 2013 11:08 AM by Alex Walker RSS

    Salesforce data reload working in Desktop client, doesn't work in SBE

    Alex Walker

      I've been using the Salesforce.com connector for a while on a local document that I have developed on my own machine. It's now come time to put it on a server so others can access it too. The problem I have is that, whilst it reloads fine in the Desktop client, as soon as I try to reload via the server (SBE), it fails.

       

      Here are some of the symptoms:

      • In the TaskLog from the server I get messages like:
        • Error The Source Document was NOT reloaded successfully. DocumentPath=C:\QLIKVIEW\USERDOCS\Salesforce.qvw.
        • Error     The task "UserDocs/Salesforce.qvw" failed. Exception:
          QDSMain.Exceptions.DistributionFailedException: Distribute failed with errors to follow. ---> QDSMain.Exceptions.ReloadFailedException: Reload failed ---> QDSMain.Exceptions.LogBucketErrorException: The Source Document was NOT reloaded successfully. DocumentPath=C:\QLIKVIEW\USERDOCS\Salesforce.qvw.    
          at QDSMain.ReloadTask.VerifyConditions(TaskResult taskResult)   
          at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)   
          --- End of inner exception stack trace ---   
          at QDSMain.ReloadTask.Reload(String fileName, TaskResult taskResult, String sectionAccessUserName, String sectionAccessPassword, eReloadOptions reloadOption, String variableName, String variableValue, Boolean moniterCpuUsage)   
          at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)   
          --- End of inner exception stack trace ---   
          at QDSMain.DistributeTask.Execute(TaskResult currentTaskResult)   
          at QDSMain.Task.AbstractTask.TaskExecution(ILogBucket logBucket, TaskResult taskResult)
      • In the DocumentLog I get messages like:
        • CUSTOM CONNECT*Provider*SalesForceDLL.dll*XUserId*XPassword*
        • LOAD Id as UserId,
          ***Lots more fields***
          SQL SELECT *
          FROM User
        • Error: Field not found - <Id>
        • General Script Error
      • I finally traced what appears to be the key difference down to the Salesforce connector logs (C:\ProgramData\QlikTech\Custom Data\SalesForce\Log)
        • When it is successful, I get entries like:
        • When it is unsuccessful, I get entries like this (note the lack of SessionId and ServerUrl and zero rows returned):

          • Connected to SalesForce with C:\Program Files\Common Files\QlikTech\Custom Data\SalesForceDLL.dll version 11, 0, 10017, 0 (DLL Protocol version: 2)
          • EndPointUrl=https://www.salesforce.com/services/Soap/u/21.0
          • SessionId=
          • ServerUrl=
          • Result_Init called with query string "SELECT Id, [lots of fields again] FROM User"
          • Successful fetch of 0 rows (     0 seconds)

       

      I suspected this was because the Salesforce credentials were only usable by the user that owns the QVW or something. So I logged in as the service user and opened the document in Desktop and it reloaded fine.

       

      So now I suspect there's a setting somewhere - either in the document or on the server - that means these connection details are getting wiped for some reason. Does anyone know of such a setting or if there is something else I can do to solve this problem?