The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Full name for company records

Jean-Emmanuel 1
Tera Contributor

Hello,

There is a field named fullname on the location table.

This field helps to track the location hierarchy.

By exemple, if we have location France which is the parent of location Paris then the fullname of the Paris location would be /France/Paris.

This field is especially interesting in our case to define user criteria by location.

I would like to understand how this field has been set up and then try to do the same on company table.

Do you have any idea?

8 REPLIES 8

Sai Kumar B
Mega Sage
Mega Sage

@Jean-Emmanuel N’ZI YAO 

It's happening via the "Location - generate full name" Business rule on the cmn_location table with the below code, You can try the same on the company table I don't believe it'll work However, you can give it a try

// call HierarchicalReference to generate the full_name 
// after business rule
// implementations should set the full_name as the display name

var r = new GlideHierarchicalReference();
r.generate(current);

Sai Kumar B
Mega Sage
Mega Sage

@Jean-Emmanuel N’ZI YAO 

It's happening via the "Location - generate full name" Business rule on the cmn_location table, I don't believe it'll work for the company table however you can replicate the rule give it a try

Thanks Sai Kumar... 
I don't know why i had not thought about business rule...

Thanks again

Sai Kumar B
Mega Sage
Mega Sage

It is happening via the "Location - generate full name" Business rule on the cmn_location table with the below code, I don't think it'll work on the company table. You can give it a try

// call HierarchicalReference to generate the full_name 
// after business rule
// implementations should set the full_name as the display name

var r = new GlideHierarchicalReference(); //It's a OOTB package
r.generate(current);