Add data to a different application | Zoho Creator Help

Add data to a different application

Requirement

Automatically add a record to a form of one application when a record is added in a different application.

Use Case

A Zoho creator account has two applications: Contact Management and Order Management. All the customer details maintained in the Order Management app needs to be added as contacts in the Contact Management application. So, when a record is added in Customers form of the Order Management app, a contact is automatically created in the Contact Management app.

See how it works

Steps to follow

1. Create two forms with the following details.
Application
Form
Field
Display Name
Link Name
Display Name
Link Name
Type
Display Name
Link Name
Contact Management
contact_management
New Contact
New_Contact
Name
Name
Name
Email
Personal Email ID
Personal_Email_ID
Phone
Phone Number
Phone_Number
Order Management
order_management
Customers
Customers
Name
Customer Name
Customer_Name
Email
Email
Email
Phone
Phone Number
Phone_Number

2. Create a Deluge function in the Contact Management application with the function name as 'Add_customer' and return type as void. Specify the arguments as shown in the table below.

Argument name

Data type

First_Name

string

Last_Name

string

Email

string

Phone

string



3. Add the following script in the Deluge editor that opens after you create a function.
  1. //Insert records to the 'New_Contact' form in the 'Contact Management' application
  2. //Assign respective function arguments as form field values.
  3. Add_customer_data = insert into New_Contact
  4. [
  5.      Name.first_name = First_Name
  6. Name.last_name= Last_Name
  7. Personal_Email_ID = Email
  8. Phone_Number = Phone
  9. Added_User = zoho.loginuser
  10. ];
4. Create workflow in the Order Management application with the following details.
 
4. Click Add New Action > Deluge Script and add the following snippet:
  1. //Call the 'Add_customer' function created in the Contact Management application.
  2. contact_management.Add_customer(input.Name.first_name,input.Name.last_name,input.Email,input.Phone_Number);

See how it works