function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jarsjars 

Problems with CTIAppExchange::SaveUserParams when upgrading from toolkit 1.54 to 3.01

Hello,

 

I am in the process of upgrading our current Connector product from the old Toolkit 1.54 to the lates 3.01 version.

However I am having a problem with saving data from the login form created by our application. Everything works correctly with 1.54 version, however when using the same code upgraded to 3.01 there's an error in Salesforce and no user data is saved.

 

In Salesforce's logs:

 

CTI 1.54:

 

07/06/2011 10:44:25: CCTIAppExchange::GetValueFromQuery: Got value from query: ClientName: CTI/

07/06/2011 10:44:25: CCTIAppExchangeSaveThread::ThreadSaveUserParams: Created SObjects; saving login data to Custom Setup tables.

07/06/2011 10:44:26: CCTIAppExchangeSaveThread::ThreadSaveUserParams: Save complete.

 

And data is saved OK

 

CTI 3.01:

 

07/05/2011 17:27:18: CCTIAppExchange::GetValueFromQuery: Query: Select c.ClientName From CustomSetupDefinition c Where KeyPath='CTI/AGENT_ID'

07/05/2011 17:27:18: CCTIAppExchange::GetValueFromQuery: Error getting query results: INVALID_TYPE: sObject type 'customsetupdefinition' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names..

07/05/2011 17:27:18: CCTIAppExchange::GetValueFromQuery: Got value from query: ClientName:

07/05/2011 17:27:19: Detected assigned campaign cp_sap

07/05/2011 17:27:19: CCTIAppExchangeSaveThread::ThreadSaveUserParams: COM error setting up custom setup objects: INVALID_TYPE: sObject type 'CustomSetup' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names..

07/05/2011 17:27:19: CCTIAppExchangeSaveThread::ThreadSaveUserParams: Created SObjects; saving login data to Custom Setup tables.

07/05/2011 17:27:19: CCTIAppExchangeSaveThread::ThreadSaveUserParams: Save complete.

 

 

I am using Developer Edition. Is this failure related to that?

 

The only info I could find relating to my issue is in the official FAQ:

 

My CTI login credentials seem to be saving themselves for admins but not for standard users. How do I fix this?

This is a known issue with the CustomSetup table we save those settings to, and there's not an easy fix for it, or else we would have done it already. Login credentials are only saved for those users with the "Customize Application" profile permission. We plan to move the credentials into the Windows Registry instead under HKEY_CURRENT_USER, but we will not do so until a later release of the CTI Toolkit. You can implement it sooner if you want, it is quite simple.

To do this, you can provide an overrided version of CCTIAppExchange -- just make a subclass of it and override CCTIUserInterface::GetAppExchange() to return your subclass instead of the base class. In your subclass, override SaveUserParams and LoadUserParamsFromCustomSetup to save them to and load them from the Windows registry instead. That will fix the problem.

 

Does this mean that in a live (production) environment we'll only be able to save "agent data" for privileged users and we must implement those overrides for the solution to run correctly?

Do we require a Client ID for this to work in toolkit 3.01?

 

Thanks for your help!

 

--

jars

eric garniereric garnier

Hi Jars,

It is normal. It is a known issue. You can check in the documentation :

 

http://wiki.developerforce.com/page/Troubleshooting_Your_CTI_Adapter#My_CTI_login_credentials_seem_to_be_saving_themselves_for_admins_but_not_for_standard_users.__How_do_I_fix_this.3F

 

Eric

 

My CTI login credentials seem to be saving themselves for admins but not for standard users. How do I fix this?

This is a known issue with the CustomSetup table we save those settings to, and there's not an easy fix for it, or else we would have done it already. Login credentials are only saved for those users with the "Customize Application" profile permission. We plan to move the credentials into the Windows Registry instead under HKEY_CURRENT_USER, but we will not do so until a later release of the CTI Toolkit. You can implement it sooner if you want, it is quite simple.

To do this, you can provide an overrided version of CCTIAppExchange -- just make a subclass of it and override CCTIUserInterface::GetAppExchange() to return your subclass instead of the base class. In your subclass, override SaveUserParams and LoadUserParamsFromCustomSetup to save them to and load them from the Windows registry instead. That will fix the problem.

 

 

Eric

jarsjars

Hi Eric, 

 

Thanks!

The link you gave is the same one I quoted.

In the end I've followed the suggestion and stored the agent data in the local registry - a not so good solution I would say, but it works...

 

However my problem went beyond that, since the process failed even when the user was a Salesforce.com admin. I opened a ticket with Salesforce and they recognized that the implementation was broken, they didn't fix it though... ;)

 

Thank you,

jars