AP.Navigator.getLocation() returns error "No context function defined"

I’m trying to get the data sent from AP.navigator.go() with the AP.Navigator.getLocation() (I’m not sure if this is the right way to do it :sweat_smile:) but it doesn’t work.
AP.Navigator.getLocation() returns this error:
“No context function defined”.
The navigation is between addonModules and I’m passing custom data as you see here:

AP.navigator.go('addonModule', {
       moduleKey: "field-actions-view",
       addonKey: "cloudapp",
       customData: {
           action: "create"

I need to get this customData with javascript. Someone could help me, please?

Thanks so much.

Hi @dianaaceves,

According to the documentation of the getLocation method:

Currently this method supports two contexts in Confluence only

As a consumer of the API, I understand you may be a bit confused as to why the method is mentioned in the Jira documentation if it is not supported at all in Jira. The reason for this is that the AP. navigator.go method is supported in Jira, but the documentation mechanism doesn’t have the ability to filter out unsupported methods.


Hi @dmorrow, thanks for your quick response!
Yes, this is my first time using the API and I’m a little lost. :sweat_smile:
So, if I can’t get my data with AP.Navigator.getLocation(), would you know how I can retrieve the values of the customData I send with AP.navigator.go()?
Thanks. :slight_smile:

Hi @dianaaceves,

The customData fields are added as query parameters to the product url with “ac.” prepended. So in your case, you should see a query parameter ac.action=create that your app JavaScript in the target module’s iframe can extract and use.