Using setnavigateto in nseventdata

lock
push_pin
done
Answered
1

Currently developing a script launched with the press of a bit of text in screen designer. I'd like to send the user to a specific URL that is found with the script.

 

I found the following in nseventdata:

SetNavigateTo(String)

I presume this is where I can set a URL to send the user off to, but nothing appears to happen upon setting it, so I must be missing something.

Does anybody have any ideas on how to solve this?

 

Thank you
MTO

18 May 2022 | 01:37 PM

All Replies (1)

Hi MTO,

could you provide a bit more context? Perhaps some code examples?

The URL must be an SOProtocol string, not a normal http URL. See the docs (bottom of this page).

You could for example do this:

EventData ed = getEventData();
// Some Logic
ed.setNavigateTo("soprotocol:sale?sale_id=" + newSaleId.toString());

Which would redirect you to a sale with the saleId provided in the newSaleId variable.

30 May 2022 | 12:56 PM

Add reply