Support Article

Unable to open document URL using onClick action

SA-31091

Summary



“Open URL in Window” action is configured on click event of a field (a read-only text field that is using format URL).

The link generated for the field has an incorrectly formed “href” attribute and hence it’s not working.

This issue happens when property referenced by field and the property referenced by “Alternate Domain URL” setting of “Open URL in Window” action are different.


Error Messages



Not applicable


Steps to Reproduce













Root Cause



This is an invalid configuration. Here we are using readonly type as URL and configuring the action 'Open Url in Window'. Type URL is given for mobile and its functionality is to launch a new window with the url given as the property value of that control. We generate a span tag which contains the action and inside that span we generate "a" tag which has href attribute whose value is the property value. Here in the given use case, property value is not the proper url hence it is launching with junk url which is an expected behavior.

Resolution



Following is the alternative design suggestion:





However this would work only if user provides the absolute URL value , that is, protocol, host and port(as necessary)).

Published December 5, 2016 - Updated December 8, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.