changing widget in time sheet portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hey @ammar_k , it might help if you describe what you were hoping to achieve. That portal widget is pretty complex, with the main container and the grid working closely together, but I have made a number of different enhancements to it over the years.
The time card grid portal widget uses some directives (bits of reusable code) that may also need changing as you go. You can see these from the 'Dependencies' and Templates drop down menus in the Widget Editor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello,
thank you for your reply.
I have changed the server side script to add some fields of the project task table
line 28 : add the fields that i want to display on the grid
var defaultHeaderFields = ['task.short_description','task.top_task.short_description', 'project_time_category', 'task.duration'];then on line 90, added these fields' labels
'task.short_description' : gs.getMessage('Task'),
'task.duration': gs.getMessage('Task Duration'),
'task.top_task.short_description': gs.getMessage('Project Name'),finally add them to the field array on line 170 :
data.fields_array = data.fields.concat(['category', 'state', 'task.sys_id', 'task.sys_class_name', 'project_time_category', 'category', 'task.duration', 'task.top_task.short_description']);
the fields are added as columns with their data but the drop down menu won't work any more
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
If the primary purpose of customising Time Card grid Widgent to include additional columns to grid, then I suggest to explore oob configuration.
1. Login as Admin
2. Navigate to All > Service Portal Widget Instance
3. Open "Time Card Portal Container" record
4. Explore "Additional options, JSON format" attribute to update JSON.
5. Append additional information to tm_grid_options.header_fields ( refer existing config for schema )
Attached image for reference.
Yogesh