The CreatorCon Call for Content is officially open! Get started here.

Business Rule - Updating a Current Field

rebecca75
Tera Contributor

I'm trying to update a current field and no matter what I try it doesn't work and the field is left blank.

This BR fires on the sc_task table and the u_orch_name and u_orch_output_parms are both there from the task table. If I do a gs.log on current.u_orch_name then I see the value just fine. However, when I try to update the u_orch_output_parms field to 'TESTER' it doesn't work. The field is a text field up to 1k chars. I tried using a glidescript to hit the task table and update the field there and still no go. Any idea why this isn't working?

find_real_file.png

12 REPLIES 12

Odd, I thought I posted this as a question? How do you do a question?


Two thoughts for you,



1. You could strip out the code which sets the u_orch_output_parms field and make it a "before" business rule.   You wouldn't have to   include the update, since that is implied to happen after the "before" rules run.



2. If you keep it as an "after" business rule, you may want to add   a line to disable the business rules from running on your update.   This avoids additional updates which you may not want to happen at this point.     Placing the following line before your update should do the trick:



          current.setWorkflow(false);




Kunal Jha
Giga Expert

Rebecca , Its weird, everything luks good.


do few troubleshooting steps like


try printing property output


gs.addInfoMessage(gs.getProperty(property name));



and then add gs.adinfoMessage('I am inside if statement') inside if statement to check if its going inside the if {}



This might help you find the issue