Get parent_id from Javascript

Sometimes you need to get current record properties from the screen.
Here is how to find Parent Record ID (if available), Current Record ID and table name for the current screen.
Please note that a record can have no parent table, or can can have no current_id (when creating a new record and have not saved yet)

var parent_id = document.getElementById("hdParentRecordID").value;

var current_record_id = document.getElementById("hdRecordID").value;

var tableName = document.getElementById("hdTableName").value;
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *