Skuid

Skuid Custom Apex Action

Skuid allows you to build pages using the out of box functionality most of the time but many a times you might have complex requirement where you would need to code Apex classes. Skuid allows to call the apex classes method using their “Run Custom Apex Action” action framework. To invoke an apex method, it has to be declared as @InvocableMethod. In this article, I am going to show you a simple example where I am displaying an Account detail page which has a checkbox “Create a new contact ?“. If it’s checked-on, it creates a single(only) contact and if the box is unchecked, it deletes the single(only) contact [this happens only after Save button is clicked]. The functionality of creation/deletion of the single(only) child contact is implemented here using Apex class – this functionality could have been achieved by using the Process Builder/Flows as well but I am doing it so to demo the Custom Apex Action function of Skuid. I have provided the code for Skuid page in XML and as well the Apex class below.

 

Feel Free to provide your valuable comments or point out any issues or scope of improvement in this post.