Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to autopopulate user's company

sri001
Tera Expert

Hi All, How to autopopulate user's company based on opened for user once submit the request from employee center.

 

sri001_0-1713980475847.png

 

3 REPLIES 3

Vishwa Pandya19
Mega Sage

Hello,

 

You can write a before Insert BR for this.

 

If my answer helps you in any way please mark it as correct or helpful.

Hi @Vishwa Pandya19,

 

Can you please help me with BR

Regards,

Bhagya 

Community Alums
Not applicable

Hi @sri001 ,

You can write this BR (can use Async BR)-

(function executeRule(current, previous /*null when async*/) {
var openedForUser = current.opened_for.user; 
if (openedForUser) {
var company = openedForUser.company;

current.company = company;
}
})(current, previous);

Mark my Answer Helpful or Accept Solution if it resolves your issue.