Apply field styles when a record is updated

Christoffer M
Tera Guru

Hello,

I have a requirement where I need to configure the "Number" field to change style when it's been updated and then change back to normal once the update has been seen by a user.

I've configured a field style to make the "numbers" bold and to display a blue dot, but I'm not sure how to only have it appear when the record has been updated.find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Wojtek Winnicki
Tera Guru

Hello,

in your case I would:

1. Create new field on the table, type choice list, with "Yes, "No" and with "none" option avaible and default. 

2. Create Business Rule with condition "Additional comment -> changes" and action to set your field to "No". Then create list style with value "javascript:current.name_of_your_fiedl == 'No'". This way you have style for the incidents that has been commented. Also you can in BR add other conditions to set this field accordingly.

3. Create Client Script on load, something like this:

function onLoad() {
	//Type appropriate comment here, and begin script below
	if(g_form.getValue('u_user_has_read') == 'no' & g_user.userID == g_form.getValue('caller_id')){
			g_form.setValue('u_user_has_read'', 'yes');
		        g_form.save();
	}
}

This way you will make sure that the Caller has read (or opened the form). The line "g_form.save()" is optional, will cause re-render of the page, but ensure that when the caller have opened the record this fact has been noted by the system. 
(As alternative to the Client Script you can for example create UI Action called for example "Mark as Read" that caller will click. Also maybe even this approach will be better.)
Then create list style with value "javascript:current.name_of_your_fiedl == 'Yes'".


View solution in original post

5 REPLIES 5

LalaEA
Tera Contributor

Hi!
No chance anyone knows how to get the same result but in Service Operation Workspace (list view)?