• Iman Nazarian
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hi everyone,

I am currently setting up Live Agent and want to trigger the automatic chat pop-up using custom variables stored in the websites source code. I wanted to ask if someone could explain to me how the setcustomvariable() deployment API works, possibly with an example? Please don't just send me the link to the developer's site as it does not clearly explain how to use the code....
Hi everyone

I am trying to change the record type of my case with the click of a button. The id of the record type I would like to change to is 012550000000AS0. I have this peace of code, it does not work currently... I get an error message saying "Unexpected token case"

{! REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
var recordtype= sforce.connection.query("select name, id from recordtype where name='Dead'");
var records = recordtype.getArray("records");
try
{
 if('{!Case.RecordType}' == 'Live Prospect')
{
sforce.connection.sessionid = '{!GETSESSIONID()}';
var account = new sforce.SObject("Case");
account.id='{!Case.Id}';
account.RecordTypeId =records[0].Id;
var result = sforce.connection.update([case]);
}
}
catch (ex)
{
alert(ex);
}
if (result[0].success=='false') {
alert(result[0].errors.message);
} else {
location.reload(true);
}
Hi everyone,

I am trying to create a button for the case object that checks a custom checkbox when you click on it (not on the edit page but on the details page).

I have tried using this piece of code but I get an error message saying: "Unexpected token ILLEGAL"

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}

var myCase = new sforce.SObject("Case.Id);
myCase.Id = "{!Case.Id}";
myCase.Initial_Interaction_Completed__c = "true";
var result = sforce.connection.update([myCase]);
window.location.reload();
 
Hi everyone,

I am currently setting up Live Agent and want to trigger the automatic chat pop-up using custom variables stored in the websites source code. I wanted to ask if someone could explain to me how the setcustomvariable() deployment API works, possibly with an example? Please don't just send me the link to the developer's site as it does not clearly explain how to use the code....