+ Start a Discussion
Jason Smith 2Jason Smith 2 

Custom Button Working in Sandbox but not Production.

I have created a custom button the Case object to create a record on a custom object. The button works correctly in my full sandbox but does not work in production. And yes, I have made sure I updated the ID's I have in my code. Any help? The button does not generate an error, just does not do anything.

{!REQUIRESCRIPT('/soap/ajax/27.0/connection.js')}

getDate = function(dateObj){
var day = dateObj.getDay() < 9 ? '0'+dateObj.getDay() : dateObj.getDay();
var month = dateObj.getMonth() < 9 ? '0'+dateObj.getMonth() : dateObj.getMonth();

return dateObj.getFullYear()+'-'+month+'-'+day;
}

var Request = new sforce.SObject('Request__c');

Request.Release_Management__c = 'a2W70000001RSwq';
Request.Related_Case__c = '{!Case.Id}';
Request.RecordTypeId ='012700000005v8J';
Request.Name = '{!Case.Subject}';
Request.Description__c = '{!Case.Description}';
Request.Case_Owner__c = '{!Case.OwnerId}';


result = sforce.connection.create([Request]);

if(result[0].success == 'true'){
    window.open("/" + result[0].id);
}
SamuelDeRyckeSamuelDeRycke
No javascript errors in your browser console ?
Jason Smith 2Jason Smith 2
Refused to set unsafe header "User-Agent"