public void setCanvasUrlPath(String newPath)
Type: Void
Use this method to override the URL path and query string of the canvas app. Do not provide a fully qualified URL, because the provided URL string will be appended to the original canvas URL domain.
For example, if the current canvas app URL is https://myserver.com:6000/myAppPath and you call setCanvasUrlPath('/alternatePath/args?arg1=1&arg2=2'), the adjusted canvas app URL will be https://myserver.com:6000/alternatePath/args?arg1=1&arg2=2.
If the provided path results in a malformed URL, or a URL that exceeds 2,048 characters, a System.CanvasException will be thrown.
This method overrides the canvas app URL for the current request and does not permanently change the canvas app URL as configured in the UI for the Salesforce canvas app settings.