Question

Can we pass SafeURL as a parameter to javascript api from navigation rule?

If I call a function like openurlinspace then I need to pass a SafeURL or an dynamic url ,

What is the syntax for Passing SafeURL from Navigation rule.?

Also I wanted to know is it a good practice to use javascript api provided by pega, as their documentation is hidden in pega 7.1.7?

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
December 8, 2015 - 1:26am

Hi Rasaiya,

I would suggest to define your own function and call that in navigation rule. And just pas the parameters (stings) that you need to form the url like activinity name , any custom parameters and make your own SafeURL in that custom function and then call openurlinspace inside it using that SafeURL, instead of directly passing SafeURL.

However apart from the above, we would liek to know what is the requirement, is it mandatory to use JS api, instead is it not possible to use the OOB events provided like launch harness, flowaction etc in window, modal dialoig etc...

Comments

Keep up to date on this post and subscribe to comments

Pega
December 8, 2015 - 1:26am

Hi Rasaiya,

I would suggest to define your own function and call that in navigation rule. And just pas the parameters (stings) that you need to form the url like activinity name , any custom parameters and make your own SafeURL in that custom function and then call openurlinspace inside it using that SafeURL, instead of directly passing SafeURL.

However apart from the above, we would liek to know what is the requirement, is it mandatory to use JS api, instead is it not possible to use the OOB events provided like launch harness, flowaction etc in window, modal dialoig etc...

December 8, 2015 - 5:20am
Response to AGRAA

This question is just for knowledge purpose.

There may be many upgraded application, where in people must have used openurlinspace.

Upgraded application like ours has gadget rule which we wanted to convert into composite portal. If we use navigation rule in the left panel then openurlinspace cannot be called from there, because we need to pass SafeURL for that, then only option left for us is to use dynamic container where we write html rule and do openurlinspace.

So was wondering if we can actually pass SafeURL from navigation rule?

I tried calling openurlinspace and took the pega rules in private check out and did some alert there. But found that even if I pass double quotes or single quotes it did not received them in pega js.