The CreatorCon Call for Content is officially open! Get started here.

New Widget Creation in my profile

shraddhajay
Tera Contributor

How to add a new widget on the “My Profile” page in Employee Center that displays information when a user gets a new personal device.

 

 

1 REPLY 1

Connectmustaq
Kilo Guru

Hi @shraddhajay ,

 

To add a new widget on the "My Profile" page in Employee Center that displays information when a user receives a new personal device, you can follow these general steps:

1. Create a New Widget

  • Navigate to ServiceNow Studio or Content Management.

  • Create a new Service Portal Widget.

  • Design your widget's HTML, CSS, and client/script logic to display device information (e.g., device details, status).

2. Define the Data Source

  • Connect the widget to the relevant table that stores device info (e.g., u_employee_device or a custom table).

  • Use a GlideRecord, REST API, or ServiceNow data widget to fetch data for the current user.

3. Add the Widget to the "My Profile" Page

  • Identify the Content page or section that corresponds to My Profile in Employee Center.

  • Edit the page layout or widget set to include your new widget.

  • Usually, this involves navigating to Service Portal > Pages > Employee Profile or similar, then customizing with "Add Widget".

4. Make It Context-aware

  • Ensure the widget filters data to only show devices assigned to the current user (gs.getUserID()).

  • Add conditions or filters to display specific device info (e.g., when a new device record is created).

5. Trigger Notification or Banner (Optional)

  • To show real-time alerts, consider adding a Notification or Banner component.

  • Or, use Client Scripts that check for new device info and display notifications on page load.

Summary

  • Build the widget that fetches relevant device data.

  • Add it to the Employee Profile page layout.

  • Ensure it is filtered for the current user.

  • Optionally, trigger notifications when a new device record is detected.

Example Reference

You can explore existing Employee Profile widgets or Device Management widgets as a starting point, and customize their logic for your purpose.

 

If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.

 

Thanks & Regards,

Mohammed Mustaq Shaik