add custom actions in forms link to function what ...
# ask-stanley-ai
n
add custom actions in forms link to function what should I input in the function column and where to find it
c
AI generated answer (using internal Slack threads):
To add custom actions in forms and link them to a function, you need to create a client script and deploy it to the record for the given form, or link a client script directly to the form. The function that you want to link to the custom action should be placed in the same place as any of the entry point functions in your client script, and you should make sure to add it to your return statement. Here is a general process: 1. Create a client script. This script will contain the function that you want to execute when the custom action is triggered. 2. In your client script, define the function that you want to link to the custom action. This function should be placed in the same location as any of the entry point functions (like
pageInit
,
saveRecord
, etc.). Make sure to add this function to your return statement. 3. Deploy the client script to the record for the given form, or link the client script directly to the form. 4. In the form customization interface, add a custom action and in the function field, input the name of the function you defined in your client script. Please note that there are some restrictions regarding the use of custom actions. For instance, you can't use custom actions on a form in view mode. However, in edit mode, as long as the 2.0 client-side script has a function to call, you can reference it under Custom Actions on the form. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832214475
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831848264
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817505
Please provide your feedback on this answer.