Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save salesforceBen/84ab6d13085ec0250c2437f4f67c5b0a to your computer and use it in GitHub Desktop.
Save salesforceBen/84ab6d13085ec0250c2437f4f67c5b0a to your computer and use it in GitHub Desktop.
({
doInit : function(component, event, helper) {
console.log('the doInit was called');
var fullURL = window.location.href;
var recordTypeId = fullURL.substring(fullURL.indexOf("recordTypeId") + 13,fullURL.indexOf("recordTypeId") + 31);
console.log('the recordTypeId is: ' + recordTypeId);
if (recordTypeId != null) {
component.set("v.RecordTypeId", recordTypeId);
// console.log('the v.RecordTypeId is: ' + component.get("v.RecordTypeId"));
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment