This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void workflowspace.add_call_log(int lead_id) | |
| { | |
| lead_obj = zoho.crm.getRecordById("Leads", input.lead_id); | |
| lead_name = ((lead_obj.get("First Name")) + " ") + lead_obj.get("Last Name"); | |
| lead_company = lead_obj.get("Company"); | |
| call_log_obj = map(); | |
| call_log_obj.put("Subject", "Call with " + lead_name); | |
| call_log_obj.put("Call Type", "Outbound"); | |
| call_log_obj.put("SEMODULE", "Leads"); | |
| call_log_obj.put("SEID", input.lead_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void workflowspace.add_notes_to_a_contact(int contact_id) | |
| { | |
| note_text = "Sample note"; | |
| note_obj = map(); | |
| note_obj.put("SEMODULE", "Contacts"); | |
| note_obj.put("SEID", input.contact_id); | |
| note_obj.put("Note Title", "Test Title"); | |
| note_obj.put("Note Content", note_text); | |
| create_resp = zoho.crm.create("Notes", note_obj); | |
| info create_resp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void add_additional_potentials (int potential_ID ) | |
| potential_obj = zoho.crm.getRecordById("Potentials",input.potential_ID); | |
| month_list={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}; | |
| for each month in month_list | |
| { | |
| new_closing_date=(potential_obj.get("Closing Date")).toDate().addMonth(month); | |
| new_potential_name=(("Auto-generated follow up potential for " + potential_obj.get(("Account Name"))) + " closing on ") + new_closing_date; | |
| //check if there's already an existing potential for this month | |
| existing_potential = zoho.crm.searchRecords("Potentials","(Potential Name|=|" + new_potential_name + ")",1,1); | |
| info "Existing results: " + (existing_potential.size()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .questionTypeComponent { | |
| .questionTypeSubComponent { | |
| .someGenericClassNameThatWillProbablyBeUsedElsewhere { | |
| line-height: 2.8; | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .someGenericClassNameThatWillProbablyBeUsedElsewhere { | |
| line-height: 2.8; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If( | |
| And( | |
| ( | |
| Datecomp(${Tasks.Due Date}, Newdate(2016, 07, 31, 12,00,'AM') ) | |
| < 0 | |
| ), | |
| ( | |
| Datecomp(${Tasks.Due Date}, Newdate(2015, 07, 31, 12,00,'AM') ) | |
| > 0 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NAME_OF_ROLE_TO_ASSIGN_LEADS_TO = "SOMEROLE"; | |
| //you'll need to create this record and assign it to someone who should receive leads | |
| //before you can use this function | |
| ID_FOR_REFERENCE_LEAD = 1176607000005707001; | |
| AUTH_TOKEN = "MYAUTHTOKEN" | |
| //get a list of all users who can be assigned leads | |
| userResp = getUrl(("https://crm.zoho.com/crm/private/xml/Users/getUsers?authtoken=" + AUTH_TOKEN + "&scope=crmapi&type=ActiveUsers")); | |
| leadidStr = input.leadid.toString(); | |
| listOfLeadOwners = List:Int(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| function ready(fn) { | |
| if (document.readyState != 'loading'){ | |
| fn(); | |
| } else { | |
| document.addEventListener('DOMContentLoaded', fn); | |
| } | |
| } | |
| ready(function () { | |
| var username = QueryString.Username, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| process.stdin.resume(); | |
| process.stdin.setEncoding('ascii'); | |
| var input_stdin = ""; | |
| var input_stdin_array = ""; | |
| var input_currentline = 0; | |
| process.stdin.on('data', function (data) { | |
| input_stdin += data; | |
| }); |