Tag Archives: javascript

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

Get parent_id from Javascript

Sometimes you need to get current record properties from the screen. Here is how to find Parent Record ID (if available), Current Record ID and table name for the current screen. Please note that a record can have no parent … Continue reading

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

Buttons on forms?

Long time ago we needed to have a button on HRNET screen. If you work with HRNET, you know, there are no buttons available on the screens. Today almost no need for buttons, but I’ll tell you how the buttons … Continue reading

Posted in Uncategorized | Tagged , , , | 4 Comments

Parse Hrnet Date

Simple snippet for Custom Scripts: convert form HRNET date string into JavaScript format /** * Parce from string representind date in format “dd/mm/yyyy” into JavaScript Date format */ function parseDate(strDate){ var array = strDate.split(“/”); return new Date(array[2], array[1]-1, array[0], 0,0,0); … Continue reading

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

Screen Validation

Many times I need to validate entries on the screen via JavaScript (or Custom Script, in terms of HR.Net). For about a year I struggled with validation via overloading function “Page_ClientValidate“. But when you overload this function, you can’t run … Continue reading

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

More JavaScript snippets

To open help screen: ShowHelp(); Returns true or false depending if the form validates or not. IsPageValid(); To switch screen into attached documents, print this setTimeout(“ShowAttachedDocs()”,0); if you print only ShowAttachedDocs() – this will give you an error when you … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

How to hide tabs in tabbed window

What I have been talking about the past few days can be seen on the screen-shots: One of the screens has “Internal” option selected and loads less details requested. The other screen-shot shows “External” option and with loads more fields … Continue reading

Posted in Uncategorized | Tagged , , , | 5 Comments

Convert HR.Net date to JS-format

Convert HRNET string with date into JS date format function getLocalizedDate(sDateStr) { var oDate = new Date(); //Parse the date according to your string var oDateARR = sDateStr.split(“/”); oDate.setDate(oDateARR[0]); oDate.setMonth(oDateARR[1]-1,oDateARR[0]); oDate.setFullYear(oDateARR[2]); return oDate; }

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

Hide data grid in Custom Script

Standard HR.Net Java Script tools does not allow to hide data grids, but this is sometimes required. Here is a JS function to hide data grids. function hideDataGrid(gridName){ var grid = document.getElementById(name); var openButton = document.getElementById(name+”Grid_ImgOpen”); var insertButton = document.getElementById(name+”Grid_ImgInsert”); … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

Java Script to hide groups of fields

With version 3 of HR.Net (Yes, I know, there is version 4 out ages ago) Vizual gave ability to insert JavaScript into Screens and Workflows. And I have been using this ability rather a lot on screen. Very often you … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment