Tag Archives: custom script

Custom Script Validation on Screens… Again!

HR.Net is a mysterious beast! Something may work in one place, but same copy-pasted might not work in the other place. Last couple hours I have spent fighting Screen Validation again. I have already written about this feature a few … Continue reading

Posted in Uncategorized | Tagged , , | 2 Comments

Switch to Attached Documents Page

A while back, when I worked with HR.Net version 3, I came up with a bunch of random JavaScript hacks. Now I’m working with version 4. JavaScript API has been changed and some of my tricks do not work in … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Autosave a screen

I had a question asked ages ago about Auto-Save of a screen. And Dan Hutson have just posted an answer to this question: // auto-save after this many minutes var countDown = 15; // get current time at screen load … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

jQuery

In case you have not realised, HR.Net is using jQuery for some of it’s functionality on screens. So power of jQuery is at your mercy when you write the Custom Scripts for the screens. Shame that the version of jQuery … Continue reading

Posted in Uncategorized | Tagged , , , | 7 Comments

Disable Form Validation When Saving Workflow as a Draft

Again, thanks Dan Huston for a great question which was this: Is it possible to distinguish between when a workflow form is being submitted and when the user is saving it to their drafts folder? We have times when the … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | 3 Comments

Validate repeating section

Thanks to Dan Huston for this script. I have not tried it myself, but I trust Dan on this matter. This script is going through all the fields in repeating sections and checks if value is provided. In repeating section … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Determine if record is saved

Sometimes we need to determine in JavaScript if record is already saved or not. You can use this function for this: /** * Check if we are creating a new record, */ function areCreatingNewRecord(){ var record_id = document.getElementById(“hdRecordID”).value; if (record_id … Continue reading

Posted in Uncategorized | Tagged , , | 4 Comments

JavaScript events triggered on screen via custom script

JavaScript has various event handlers, like onChange or onMouseOver. In HR.Net it is not obvious how things work and how to trigger functions based on events.. Here are some tips: This is how to trigger event when date field on … Continue reading

Posted in Uncategorized | Tagged , , , , | 4 Comments

Execute Stored Procedures From Screens

We discovered a way to execute SQL Stored procedures from HRNET screens, via JavaScript custom script. Nothing new for the world of JS, but new for us. I did not know you can run sql queries from JavaScript… Here is … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Java Script Validation in Workflow

This method no longer works with later versions of HR.Net. See update. Screen validation has been mastered by me a long time ago and we are using it all over the place. But workflow screen has not been properly validated … Continue reading

Posted in Uncategorized | Tagged , , , , | 9 Comments