How to use current.setValue for string field in business rule

Roshini
Giga Guru

I am using a after business rule to set one field value code is . Field type is Choice and name is u_use_method. I need to set this field to local based on few conditions. Am trying to use current.setValue('u_use_method', local), where local is the backend value of the choice field. But this is not working. Any suggestions please

1 ACCEPTED SOLUTION

Anubhav24
Mega Sage
Mega Sage

Hi @Roshini ,

It looks like you're running this on when = after, which you can't use to set values. 

You should make the BR before and then as already suggested by other colleague run the setvalue statement.

 

Please mark helpful/correct if my response helped you.

View solution in original post

5 REPLIES 5

Pratiksha2
Mega Sage

Hello @Roshini ,

Please try below code and trigger Before Update BR:

current.setValue('u_use_method', 'local');
current.setWorkflow(false);
current.update();

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Pratiksha