The following mandatory fields are not filled in:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2017 08:37 AM
Hi community,
I want to set focus on the mandatory field if it is not filled by the user after click on Save/Update button,
Please find the snapshot below,
Here I just want to focus the Resolution Code if it is not filled by the user.
Like that the focus should be set on the first mandatory field based on the error message.
How to do that?
Please help me.
Thanks,
AnnBel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 05:01 AM
Anna,
After conducting a short investigation on the matter, I may say that I am not sure where the Warning Message is specified.
I would think that there is a Client Script which is being "fed" by the UI Policies and UI Actions responsible for the Mandatory status of any fields -> whenever any UI Policies or Actions determine that their conditions are not met (there is an empty Mandatory field and in the same time the logged in user wants to perform an action: for example Save / Update) they notify the Client Script and it issues, to say so, the Warning Message to the specific form where the action (Save / Update) is being executed. Yet, after checking the Client Scripts I did not find such which contains such message "The following mandatory fields... ".
So I would conclude that these messages are hard - coded somewhere in the SNOW Platform, and as everything hard - coded - SNOW does not want a user to make any modifications on such elements. So, as Shiladitya said earlier - in regards to this specific matter you may contact HI Support. I am sure the guys there will be able to provide some clarification on the exact location of the messages.
In regards to another topic, which came to me from this discussion: How to ensure that you specify the order in which the Mandatory fields are being mentioned in the warning message: which first, second and 3th -> I believe this is up to the order in which you are adding the UI Policy Actions in the specific UI Policy for example. Also, if there are several UI Policies that are responsible for the Mandatory state of couple of fields -> then the Order of these UI Policy will also play part for the prioritization of the fields displaying. As to UI Actions -> I do not believe that you can combine the warning message for Mandatory not filled in fields that comes from UI Policy with the same warning message which comes from an UI Action.
Anyway, if you will decide to reach to HI Support, then you may also verify this with them.
Best Regards,
Georgi Mavrodiev
IT Consultant
Do IT Wise
You may visit us in our Web Site: www.doitwise.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 07:27 AM
Anna,
Just to add to georgimavrodiev note: if possible, make sure you are not causing an administrative overhead for yourself by showing or focusing the fields in a certain order. Requirements tend to change and evolve with the organization, and so today you might have a field mandatory and tomorrow it won't be, or some other field will become mandatory. You will then have to review your process and shift UI policies and whatnot to accommodate the change. Even if very well documented, you will still have to spend time running through the process.
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 02:46 AM
The above code will not work in Portal,
Regarding where the inbuilt code is
script include -> SysMessageAjax
the class used is GwtMessage , but I dont think this is editable
Please make helpful, if my answer was of any use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 02:53 AM
Thank you for your reply.
May I know where this class "GwtMessage" class is defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2017 02:56 AM
For this code, you'll have to ask HI.
Its not recommended by SN to modify it..
What I understand you want to set the focus on fields which are mandatory and not filled in by user..
the issue with that is, in HTML you can set focus on one element at a time only..
e.g. you have four mandatory fields & all are empty, the internet browser will set focus on the last element/field and not all..