cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry Javascript rule not executing on WPF client

Former Member
0 Kudos

Hi All,

I'm trying to run a Javascript rule in the WPF Agentry client (from SMP3 SP6 PL1) but it's always returning false.

What am I doing wrong?

2015/01/27 11:43:27.000: + JavaScriptTerm=function fooBar() {

return true;

}

fooBar();

2015/01/27 11:43:27.000: Result<Boolean>= false



I also tried to add opening/closing curly brackets in comments (/* } */ ) like suggest in this thread but it didn't make a difference.

http://scn.sap.com/thread/3609728

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

ray_isada
Participant
0 Kudos

Hi Christian -

This issue seems to be that the JavaScript text is not being updated after a transmit. It appears that the rule is being transmitted to the client - can you tell us if it's the updated rule or the original rule...?

There's actually an open defect similar to this - I'll be glad to add your report if you can confirm the above. Of course, try Mark's suggestion above first, and see if that works for you, however.

Thanks,

Ray

Former Member
0 Kudos

@Ray -

We are experiencing the same issue as the original poster. We tried Mark's suggestion and the rule is still returning false. You mentioned an existing defect for this behavior. What is the status or outlook on when this may be fixed?

Thanks,

John

mark_pe
Active Contributor
0 Kudos

Christian,

From what I can tell and while coordinating with my colleague who uses this all the time:

The JavaScript  should evaluate to “true” in an Agentry Boolean context.


Provided that the transaction data type of your object property is Boolean (top down) then this return of Boolean should return true.

You might try the following to see if you get the same results…

function fooBar() {

return 1 == 1;

}

fooBar();

At first glance, this would appear to be a defect.  It’s about as simple of a test as there could be.


if the above works then it is something else. Or it could be a device client issue if it works on other devices.


That is what we can think off right now.


Best Regards,

Mark Pe

SAP Senior Support Engineer