How to replace a hardcoded sys_id with system property in condition Business Rule

Varun40
Tera Contributor

Hi All,

I wanted to know, how to replace a hardcoded sys_id with system property in condition Business Rule

Varun40_0-1678192264270.png

I am trying to replace the sys id with system property in condition but unable to achieve it.

Please help.

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Varun40 ,

You can directly use gs.getProperty('Your_Property_Name') in the condition of Business Rule, just update your condition like the one below.

(new global.AssessmentUtils().conditionCheck(current, 'state=7^business_service.company.parent=' + gs.getProperty('<Your_sys_propert_name>') + '^EQ'))

 

Thanks,

Anvesh

Thanks,
Anvesh

View solution in original post

2 REPLIES 2

AnveshKumar M
Tera Sage
Tera Sage

Hi @Varun40 ,

You can directly use gs.getProperty('Your_Property_Name') in the condition of Business Rule, just update your condition like the one below.

(new global.AssessmentUtils().conditionCheck(current, 'state=7^business_service.company.parent=' + gs.getProperty('<Your_sys_propert_name>') + '^EQ'))

 

Thanks,

Anvesh

Thanks,
Anvesh

Laszlo Balla
Mega Sage
Mega Sage

Looks like you have an extra close parenthesis after AssessmentCreation.

It should look like AssessmentCreation().condition....