Author Archives: admin

Subscribe community to a user

I’ve been asked today by one of the reader “How to subscribe a user to a community though a back-end”. And here is the answer to the question: There is a stored procedure that will do that for you. The … 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

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

Change column collation

This is how you can change text column collation to something else ALTER TABLE tableName ALTER COLUMN columnName nvarchar(1000) COLLATE Latin1_General_CI_AS

Posted in Uncategorized | Tagged | Leave a comment

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

Export data as XML

This is how you export XML from SQL Server select * from table for xml auto, elements

Posted in Uncategorized | Tagged , | Leave a comment

List users per role

Admin Console of HR.Net allows only to list users by their primary role. And secondary roles are in a shade. To display all users that belong to a particular role (primary or secondary) you can use this bit of sql: … 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

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