How to get the URL from the Menu Item Script.

Priya Gautum
Kilo Guru

Hi Team,

Requirement: In the portal, if we click on Menu item it should redirect us to the defined URL.

Could you please help me to get the URL from the server script in the Menu item.

URL would be in a field(new field) which will be present in the product table(u_cmdb_ci_products).

I need to create a new field in the Product table but not sure what type should I take URL or String?

Actually, we don't want to give the URL in the menu item directly, as it will get changed every 4 months. that is why we are giving the URL in the Product table.

Regards,

Priya

 

6 REPLIES 6

Ct111
Tera Sage

Hello,

Configuration of menu items can be understood better via below link

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/content-management/ta...

 

And how to create URL can be better understood by below link

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/concept/nav...

 

Mark my ANSWER as CORRECT and HELPFUL if it helps

Allen Andreas
Administrator
Administrator

Hello,

If you don't mind, please either edit your question or provide an update as to what you're looking to do. You mention in question topic as well in the first few sentences you do want the URL in your menu item...then...at the last moment, the last sentence, you say:

Actually, we don't want to give the URL in the menu item, as it will get changed every 4 months.

That's pretty confusing...

For the field on your product table, you can use string, which allows for a more scalability, if needed.

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


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

Hi Allen,

I have updated the Question.

Actually, we need to get the URL from the different table fields, as it will get changed after every 4 months.

Regards,

Priya

Hi,

Thanks. I'm glad you found my reply as Helpful. This allows others to easily get on the same page with you.


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