Tag Archives: javascript

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

Java Screen Field Validation

It has been a while since I had to do JavaScript in screens. And even longer since I done a validation on the screen. Since then there were changes in HR.Net which I have missed. And my old way to … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

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