Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Dictionary Override

shubhamakhaire
Giga Contributor

I have custom table u_projects which is extended from task table. I need to display "Number" field on the u_projects table as "Project ID" using dictionary override as it should not affect anything on the task table.

6 REPLIES 6

VikMach
Mega Sage

@shubhamakhaire, I see what you're trying to achieve here but that is not how it works.
You can display the number field from Task table by creating a new Label for the Number field (See Example 1 below) but it is not a good approach because then your "Project ID" will pick Task tables Auto Numbering like "TASK0024102" etc.
If you are okay with that kind of auto numbering then you can proceed.

Otherwise, you can create a custom "Project ID" field and create your own Auto Numbering. (See 2nd Example)


Example 1 : NOT RECOMMENDED
To achieve this, you can create a new "Label" for your custom table on "Number" dictionary entry. See example below.

VikMach_0-1765126951269.png


When you create a new record on your custom table the Auto Numbering will take effect from Task table because you have extended your custom table form Task Table. See example below.

VikMach_1-1765127030327.png

 


Example 1 : RECOMMENDED

 

Create a custom Project ID field and create auto numbering through Script include, then call it in the custom field.

VikMach_0-1765131923121.png

 

VikMach_1-1765131997767.png

 

 

VikMach_0-1765132516501.png

 

 


Hope this helps.
Let me know if it worked.

Regards,
Vikas K

Hi @shubhamakhaire 

I agree with first half of @VikMach has said.

Go to dictionary, and create a label for your custom table Number field like:

 

Mohammed8_0-1765134718017.png

 

Instead of script you can try this, Go to number maintenance table (sys_number) and create New

 

Mohammed8_1-1765134864244.png

 

Select your custom table, in my case my table is testing and give prefix as shown:

 

Mohammed8_2-1765134931030.png

 

Result verification, you can the changes instead of task number its PROJ:

 

Mohammed8_3-1765135050332.png

 

If you find this answer useful, please mark it as helpful/solution accepted.

 

Thanks and Regards,

Mohammed Zakir

@Mohammed8, oh yes, that's right!
I forgot about Number Maintenance table. Thanks for reminding.
That is the recommenced approach. 

 

Regards,
Vikas K

Its_Azar
Tera Guru
Tera Guru

Hi there @shubhamakhaire 

 

This is exactly what Dictionary Override is meant for. Go to System Definition → Dictionary, open the record for the Number field on the Task table, and then create a Dictionary Override for your child table u_projects. In the override record, set the Label to “Project ID” and save. This will change the field label only on the u_projects table without impacting Task or any other tables extended from it.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG