difference between getTableName and class name

Amey3
Giga Expert

Hi 

I am looking  for  the difference between getTableName() and sys_class_name

any approach with practical implementation is appreciated.

Thanks in Advance

Amey

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

Please reference this post which asks the same question: https://community.servicenow.com/community?id=community_question&sys_id=6a3e87eddb9cdbc01dcaf3231f96... and contains use cases, etc.

Essentially, once is utilizing a field on a table to retrieve that information whereas the other is calling a function...to then go and get it. So it's advisable to use the field versus calling a separate function to go and retrieve it if it exists (i.e. only exists on tables extended from Task).

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

11 REPLIES 11

Allen Andreas
Administrator
Administrator

Hi,

Please reference this post which asks the same question: https://community.servicenow.com/community?id=community_question&sys_id=6a3e87eddb9cdbc01dcaf3231f96... and contains use cases, etc.

Essentially, once is utilizing a field on a table to retrieve that information whereas the other is calling a function...to then go and get it. So it's advisable to use the field versus calling a separate function to go and retrieve it if it exists (i.e. only exists on tables extended from Task).

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Thanks for the Link.

It is pretty much useful

Hi,

You're welcome. Are you sure that the reply you marked Correct is actually Correct and helped guide you appropriately?

If you don't mind, please review these responses as I feel pretty strongly I covered it correctly.

You can only mark one reply as Correct and that post below contains misinformation, in my opinion.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

@Allen A  Marking your response as correct.

I usually don't follow the Question Thread which are not marked correct.

The Thread which you gave is informative but isn't marked correct. I actually went through it but that wasn't marked correct so just put it aside for while and posted the question directly on community.

Thanks