What is the difference between current.getTableName() and current.sys_class_name in terms of operation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:10 PM
Hi All,
I have used both current.getTableName() and current.sys_class_name in an existing Business to perform a specific operation .I got the desired output
by using current.sys_class_name ,But that did not work for current.getTableName().Please share your valuable inputs(practical scenario) apart from the Wiki.
Thanks in Advance.
- 57,204 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:30 PM
Hi,
getTableName() is mostly used in retrieving the table name in the client script [g_form.getTableName()] similar to getting the unique value [g_form.getUniqueValue()].
We can even use this function even at server side current.getTableName(). However, since we have the desired return value of this function in a column sys_class_name, it is advisable to use the field for verifying instead of calling a function. This would reduce effort in calling the function and executing another few statements in the function.
Regards
Viswanath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:49 PM
Hi Viswanath,
Thanks for the timely reply.Irrespective of the lengthy execution both the condition must return the desired output.
I am getting the expected result for sys_class_name but not for getTableName()!.
What can be the specific reason behind that......Please clarify.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:31 PM
Hi Sambit Rath
You will not get the desired output if you use the "current.sys_class_name" on any custom table which doesn't inherit the task table.
However you can use the "current.getTableName()" and ""current.sys_class_name" on any table which inherits the task table to get the desired output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:33 PM
Spot on Pradeep Sharma