Hello Everyone,
Here we are again thrilled to share another requirement that has been accomplished through the implementation of custom functions.
A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.
Requirement:-
One of our customers had a specific requirement to automatically update a custom picklist field available in the Project layout once a specific Task is closed.
Custom function code:-
// update the connection name, picklistFieldId and picklistFieldValue
endPoint = "https://projects.zoho.com/restapi/portal/";
picklistFieldId = "UDF_CHAR9";
picklistFieldValue = "Red";
projectsParameter = Map();
projectsParameter.put(picklistFieldId,picklistFieldValue);
updateProjectResponse = invokeurl
[
url :endPoint + portalId + "/projects/" + projectId + "/"
type :POST
parameters:projectsParameter
connection:"xxxxxxxxxx"
];
return "success";
Make sure to replace "xxxxxxxxxx" in the above code with the connection link name. And, update "picklistFieldId" with the custom field id available in the project layout and picklistFieldValue with the custom value to be updated.
We hope you found this post useful. If you have any questions or wondering if your requirement could be met using custom functions, feel free to share them in the comments section below.