Hello TDM-Team,
I need to customize the Entity form - to add a button which will add technical fields at the current opened Entity (for instance .CHANGE_TIMESTAMP). According to your comments in previous topics I have already added a button and created function which controls OnClick event. But I don’t know how can I get the current opened Entity. Please, could you help me?
I am not sure what you wish to add and where exactly (technical fields).
I did the following:
I created new user package via File | New Package menu item (Expert mode must be enabled)
I edited the entity form and added there new button and changed its name to myButton.
In package explorer I located the new package, right clicked the Script folder, added there new script and renamed the script to FmPEREntityEdit (BTW: this is the name of Entity Properties form. The name must be set to this if we want to use events.)
I created the following function:
function myButtonOnClick()
{
var Log = System.CreateObject(“Log”);
Log.Information(Entity.Name);
}
This function writes entity name to Log.
Note: the name of the function is made of button name and event name. myButton and OnClick.
To access the entity name, just use Entity.Name.
For more information please read the Customization Sample topic in User Guide. For complete list of objects and properties please look at the Reference Guide. Both documents are accessible via Help menu.
If you need additional assistance, write us here or send us a messsage to modeling@quest.com (you can write us email in Czech, if you like).
Entity.Name was the answer Thank you very much, I didn’t realise that I can use this attribute when I want to find the name of the current Entity (selected entity - where the button was pressed).