Home > Forum > Rules, JS, SQL > Passing Instance ID using Hyperlink button with StartElement

Passing Instance ID using Hyperlink button with StartElement
0

Hello all,

I'm trying to set up a button to start another workflow but I want to pass the current instance ID so I can relate the two instances.

I'm using the info from Webcon but I don't know how to pass the ID:


" class="fr-rounded fr-large" onclick="StartElementInNewWindow(54,54, 'AttText47=' + encodeURIComponent('WFD_ID'))">
Legal Request Process


Using this, I'm basically writing WFD_ID in the destination field.
Does anyone know how to get this working=
Thank you

MVP

Hi Andreia,

I'm not sure whether you copied the generated html from the browser here, the one from the expression editor when you clicked on show, or the actual expression editor value.

If you copy this one to the expression editor it should work fine:


" class="fr-rounded fr-large" onclick="StartElementInNewWindow(#{WF:54}#,#{DT:54}#, 'AttText47=' + encodeURIComponent('#{WFD_ID}#'))">
Legal Request Process


Make sure that the target field is either set to editable or "Read only (cannot be modified except by JavasSript).

Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings