Wish list
If you like this blog and want to say thanks in some way, here is my wish-list on Amazon. It'll be very cool to get a gift from my subscribers. Just don't forget to put your name on it -)Tags
Tag Archives: custom script
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
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
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
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 code, custom script, javascript, Screen, snippet, validation
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
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
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; }
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
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
URL Label for Employee HR.Net Year Calendar not working when used on a workflow form
There is an issue that occurs when the ShowHRYearCalendar() javascript is used on a workflow form. Using the javascript URL Label of ShowHRYearCalendar() on a workflow form does not display the standard HR.Net Year Calendar. Using the same javascript in … Continue reading