I could not find any Appian documentation that describes how to add dynamic variables to Integrations/Web APIs for use with a!urlForRecord() and I was wondering if anyone had any guides or advice I would greatly appreciate it!
Discussion posts and replies are publicly visible
I am not sure I understand what you are looking for. Integrations are used to call other systems from Appian. Web APIs are used to receive calls from other systems to Appian. And then there is urlForRecord() ....
This does not fit together in my head.
The recommendation for using partially Portal compatible functions (e.g. urlForRecord()) is to use a Web API and Integration as outlined in greater detail here: https://docs.appian.com/suite/help/24.3/portals-design.html#using-partially-compatible-functions-and-objects-in-a-portalEssentially my question is how to pass in the Record Identifier to the Web API where urlForRecord() is called?
Got it. Let me first ask a question. What are you doing with that URL? I mean, portals are meant to serve anonymous users. This unknown user will not be able to access that record URL.
I was intending on using the URL to prompt a user to sign in and redirect them to a site where logged in users can view more information about a record than is publically available.
I suggest to build the web API first. It should accept the record ID in a URL parameter.
Then create the integration and add a rule input for the record ID. I passes the ID as a URL parameter.
Then you can call that integration in your portal interface.
Since portal is intended for public users, there are some functions which cannot be used as it may require some user context. So, we try to achieve it using a service account which is an Appian account primarily used together with API key.
You can create a Web API that gets the record identifier from the query parameter of the HTTP request and construct the record url of the record. Then you can pass the url as an HTTP response.
Also, create an integration that gets the record id as rule input, call the Web API created above and pass the rule input as query parameter. The identifier will be passed to web API as part of HTTP request.
You can then use the result of Integration in your portal objects.