Client Script to check Work Notes have been entered.

John Prouty
Kilo Guru

I want a Client Script that will detect if a Work Note has been entered for the record.  Once data is entered in the Work Note, SN moves the data to the Activities Log, so the Work Notes field is empty.  But the Activity Log contains all kinds of data (changes to fields, opened by data, etc.).  How do I find only Work Notes entries?

1 ACCEPTED SOLUTION

John Prouty
Kilo Guru

I was hoping to use the Journaling of SN to do this, but I guess I will have to use a text field. 😞

View solution in original post

10 REPLIES 10

SanjivMeher
Kilo Patron
Kilo Patron

Does this not work for you?

if (g_form.getValue('work_notes')!='')


Please mark this response as correct or helpful if it assisted you with your question.

Willem
Giga Sage
Giga Sage

Hi John,

Can you share more of the background on this with us? When and why do you want to check if a work note is entered?

You can create an onChange Client script on the work_notes field for example:

find_real_file.png

 

 

In addition, in some cases you could also consider a Business rule. For example a before insert/update to check if work notes have been added.

find_real_file.png

 

 

 

When data is entered into Work Notes, SN logs it into Activities and clears the field out.  So it is always =="".

I think I need a way to query the Activity Log for the types for records that come from Work Notes for this record, but I don't know how to do that.

Hi John,

When you save it, the work notes field gets emptied and the content added to the journal. But that is only when you save the record. So both onChange client script and before insert/update business rule will be able to get you the value.

 

Please provide us with:

What is it you are trying to do. As in, what is the business case. Why do you need to retrieve the value, for what purpose and what do you want to do with it?