How can we use Custom Form Key in Camunda 8 Form
Hi @SohaHesham !
What exactly do you want to know?
Do you want to learn
- What to use it for
- How to use it?
Are you a previous C7 user and want to mimic the behavior?
You can also read the documentation:
Not documented yet, but for more flexibility, you can combine the key with variables, for example the key is SAP
and you store the record ID and type in variables, and use it to construct a URL to your SAP UI at runtime.
Best,
Christian
Hi @christian-konrad
I am a new Camunda User, I want to know what to use custom form key for and how to use it.
As it is not documented yet. It is an available feature or it will be released next?
As written in the documentation, that A form referenced by a custom form key will not be shown in Tasklist. So, what is the difference between using custom form key and using none option with APIs to link it to the process?
Hi @SohaHesham !
The custom form key is available since Camunda 8.0, and you can use it to provide a standardized way to identify your custom form, UI, or web page to show in your own applications. It is returned by the query API when you fetch multiple tasks.
what is the difference between using custom form key and using none option with APIs to link it to the process?
You can also use the none option and use your own variables to identify the system to use, and define these variables when querying tasks.
The main difference is that the custom form key is a standardized way, so if you work with other developers you don’t need to have your own documentation about the variables to use, and the form key is returned per default in the task query. You can use the form key to easily filter for tasks that are relevant only for a specific system, such as an ERP.
Example use case combining the form key and a dynamic variable:
In your backend, you would then have code like
switch (task.formKey) {
case "webApp:ERP":
const url = "https://my.erp.com/record/" + task.variables.recordId;
// TODO redirect user to URL
default:
// render Camunda Form
}
Hi @christian-konrad
Thank you for your reply
When it redirect the user to the url, when the task is opened in the tasklist or not?
When the code is executed or How to call it?
I need a detailed Example
Hello mate,
Any Update?
If yes can you tell me pls I’m having the same problem.