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
Oxala AlexandreOxala Alexandre 

Uncaught ReferenceError: Desktop is not defined - sforce.one.navigateToSObject(caseId);

Hello
I have developped a VF page with a controller extension on case
When I perform my action, I want to go back to my case
Here is my code : caseId is defined and is Id of case and is defined in function processResult
But in mobile, I don't go back to case detail and in browser I have got this error : Uncaught ReferenceError: Desktop is not defined
Can you please help ?


function saveSignature()
{
    strDataURI = "blabla";
    AnyObjectSignatureController.saveSignature(strDataURI,caseId,processResult);
}

function processResult(result)
{
    myresult=JSON.stringify(result);
    if (myresult=="\"OK\"")
    {
         myUrl="https://cs17.salesforce.com/"+caseId;
         if( (typeof sforce != 'undefined') && (sforce != null) ) {
              // Salesforce1 navigation
              sforce.one.navigateToSObject(caseId);
            }
         else {
            // when calling action from browser
             window.close();
         }
        
    }
    else
    {
        alert("Erreur à la sauvegarde : "+myresult);
    }
}
ShashForceShashForce
Hi Oxala,

Please see if this helps: http://forum.jquery.com/topic/referenceerror-desktop-is-not-defined

Thanks,
Shashank