Delete Button on Input Forms - Calling Custom Functions | Community
Skip to main content
New Participant
September 28, 2023
Solved

Delete Button on Input Forms - Calling Custom Functions

  • September 28, 2023
  • 1 reply
  • 784 views

Hello All,

 

We have custom schema for our implementation, where we have created Input forms for managing data.

We have a requirement wherein we need to do certain checks, when the Delete Button is clicked. How can that event be captured, so that we can add custom code for checking few business logic while deleting the record.

 

Regards,

Dipendu

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Marcel_Szimonisz

Hello @dipendu_g ,

this may help you:
- in form add

 

<container colspan="2" type="visibleGroup" > <input img="nms:<some_delete_icon>.png" label="Delete" type="button"> <enter> <!-- SOAP call to get the generated source --> <soapCall name="CustomStuff" service="xtk:workflow"> <param exprIn="@id" type="int"/> </soapCall> </enter> </input> </container>

 

 

- in your schema add

 

<method library="cus:workflow.js" name="CustomStuff" static="true"> <parameters> <param desc="Workflow id" inout="in" name="id" type="int"/> <!-- <param desc="Status" inout="out" name="status" type="boolean"/>--> </parameters> </method>

 

 

- in cus:stuff.js library add  (this is example you can have your own library),

 

var xtk_workflow_CustomStuff = function(id){ //do something }

 

 

Official documentation:
https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/input-forms/form-structure.html?lang=en#soap-methods

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

1 reply

Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
October 2, 2023

Hello @dipendu_g ,

this may help you:
- in form add

 

<container colspan="2" type="visibleGroup" > <input img="nms:<some_delete_icon>.png" label="Delete" type="button"> <enter> <!-- SOAP call to get the generated source --> <soapCall name="CustomStuff" service="xtk:workflow"> <param exprIn="@id" type="int"/> </soapCall> </enter> </input> </container>

 

 

- in your schema add

 

<method library="cus:workflow.js" name="CustomStuff" static="true"> <parameters> <param desc="Workflow id" inout="in" name="id" type="int"/> <!-- <param desc="Status" inout="out" name="status" type="boolean"/>--> </parameters> </method>

 

 

- in cus:stuff.js library add  (this is example you can have your own library),

 

var xtk_workflow_CustomStuff = function(id){ //do something }

 

 

Official documentation:
https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/input-forms/form-structure.html?lang=en#soap-methods

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/