My apologies in advance for being a JavaScript newbie. I just discovered custom buttons could create new related records, and I managed to get that working with no problems. Now, once it's done creating that record, I want to send it to another (related) page. But I can't figure out the syntax of how to do it.
I'm working with a custom Object related to the Case object as Master Detail. I won't bore you with the other code, as it's working just fine. But once it does its thing, I want it to go back to the case record that it is related to.
So, for example...
{!REQUIRESCRIPT('/soap/ajax/27.0/connection.js')}
//Code to do other stuff...
var mycaseid = "{My_Object__c.Case_ID__c}"
//where the Case_ID__c field is capturing the ID of the master Case that my custom object is related to//
parent.window.location = "https://na6.salesforce.com/"+mycaseid
I know this doesn't work, but I don't know what syntax I should use. How do I refer dynamically to the "https//na6.salesforce.com/" part of the url and how do I "paste" the case Id to it?