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
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.