Does anyone know if i can flip the current choices in the dropdown to have "Your teams work" display
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 07:51 AM - edited 05-16-2024 09:04 AM
Hello Devs,
I have been chasing my tail on an issue:
Does anyone know if i can flip the current choices in the dropdown to have "Your teams work" display first?
I have made a copy of the service desk landing page and need to flip the order of the items in the dropdown menu.
I have updated the UX Client script include below by flipping the order in which the choices are called, but the dropdown menu does not change, is there another piece I am missing?
SowIncidentLandingPageUtils:
}
/**
* Returns configuration for work persona dropdown
* {object} helpers
* @return {object}
*/
static async getWorkPersonaConfig(helpers) {
return {
"items": [{
"id": "your_work",
"label": await helpers.translate("Your team's work")
},
{
"id": "your_team_work",
"label": await helpers.translate("Your work")
}
],
"defaultSelected": ["your_team_work"]
}
}
Any help would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 11:18 AM
This might sound silly, but given what you've posted I'm wondering if you just need to re-order the placement of the items in the object. Have you tried putting Your Teams Work first?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:09 PM
Hello @KevinBellardine ,
Not silly at all, i have in fact tried that to no avail. I thought it would be something pretty straight-forward but i guess not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:25 PM
this should work Please reload sow and see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:42 PM
@Gangadhar Ravi i updated the SowIncidentLandingPageUtils, which from my understanding overwrites the SowIncidentLandingPageUtilsSNC ux client script include with the code below and the SOW is still showing your work first in the drop down:
/**
* Returns configuration for work persona dropdown
* {object} helpers
* @return {object}
*/
static async getWorkPersonaConfig(helpers) {
return {
"items": [{
"id": "your_team_work",
"label": await helpers.translate("Your team's work")
},
{
"id": "your_work",
"label": await helpers.translate("Your work")
}
],
"defaultSelected": ["your_team_work"]
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 12:45 PM - edited 05-16-2024 12:46 PM
what variant of the home page you are trying to update ? there are 2 different ones it uses different scripts. i am able to update please check below.