Last active
January 1, 2016 08:49
-
-
Save stomita/8121157 to your computer and use it in GitHub Desktop.
Get prefix from parent window record id.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPrefix() { | |
try { | |
return window.parent.recordId ? window.parent.recordId + '/' : ''; | |
} catch(e) { | |
return ''; // when access is not allowed to parent window object (maybe in different origin) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment