Tag Archives: snippet

Restart HR.Net services

HR.Net is full of WTF moments. This whole blog is based on these moments: from ancient version of jQuery to obscure bugs in places where “things should just work”. This time I run into Workflow service that sometimes gets stuck: … Continue reading

Posted in Uncategorized | Tagged , , | 4 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

Convert Report to be Landscape

Today I had to make a new report in HR.Net Document Explorer. Unfortunately version of HR.Net I’m using is buggy. Every time you try to view a report preview, it crashes: Vizual claims that this error is because I’m running … Continue reading

Posted in Uncategorized | Tagged , , | 5 Comments

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

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

Import into SQL Server from CSV

This is how to import data from CSV into SQL Server BULK INSERT TableName FROM ‘c:\data.csv’ WITH ( FIELDTERMINATOR = ‘,’, ROWTERMINATOR = ‘\n’ ) GO

Posted in Uncategorized | Tagged , | Leave a comment

Join Update

Update table with entries from other table, with join update table set field1 = other_table.field1, field2 = other_table.field2 from table inner join other_table on other_table.field3=table.field3

Posted in Uncategorized | Tagged , | Leave a comment