HRSD hr_ServicesUtil for backend

Cristina Costa
Tera Contributor

Hello, 

 

When I create a HR Case through the Portal I see all the variables (see img.1) 

CristinaCosta_0-1707928890503.png

But when I create though out the Backend it does not catch the variables and stays empty. 

I created a Business Rule: 

(function executeRule(current, previous /*null when async*/) {
var producer ='';
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, current.hr_service.producer);
})(current, previous);
 
Is the code wrong? 
Thank you very much 
 
3 REPLIES 3

Sumanth16
Kilo Patron

Hi @Cristina Costa ,

 

this is the function within that script include which gets the questions and it's answers

Function: _getProducerQuestions

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

So you create the Business Rules like: 

(function executeRule(current, previous /*null when async*/) {
var producer ='';
new sn_hr_core.hr_ServicesUtil(current, gs)._getProducerQuestions(producer, current.hr_service.producer);
})(current, previous);
 
it i snot working 

saurabh_dubey
Kilo Sage
var producer ='';
new sn_hr_core.hr_ServicesUtil(current, gs).createCaseFromProducer(producer, current.hr_service.producer);
} ---> This will not work in Business rule.
 
We add this script to populate the record producer details in the description field.
This will never work in the Business rule, we use this only in record producer.
 
If my solution help you do mark my answer helpful,
Thanks
Saurabh.