How can I update the value inside a custom function from another custom function?

How can I update the value inside a custom function from another custom function?

Hello there,

I have two custom functions right now, one of them has a variable called 'token' inside of it, and then I have another function (custom function) that I want to use to update the 'token' variable I have in custom function 1, is this possible by using REST API functions?

To illustrate it better, I have custom function that looks like this:

Custom function 1()
token = "abc123";
return token;

then from custom function 2, I want to modify the value 'token' in custom function 1, using the API type of function (so I made custom function 1 to be REST, and I added arguments on it, so my final custom function looks like this:  

customFunction1(token)
mytoken = "";
if(token != ""){
mytoken = token;
}
return mytoken;

Then, I have tried to do this code in custom function2:

customfunction2()
updatecustomFunction1 = invokeUrl
[
URL: "the URL to get to my function"
Method: POST
parameters {"token":"testtoken"}
connection: myconnection
];

when I run the above code, I get a blank value for the output, am I doing something wrong or is this just not possible?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方