This file contains 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
<?php | |
include_once 'TestScaffold.php'; | |
class SpecialFormTest extends TestScaffold | |
{ | |
public function testTitle() { | |
$cookies=$this->cookie(); | |
$cookies->clear(); | |
$this->url('http://localhost/special_form/public/' ); |
This file contains 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
<?php | |
class TestScaffold extends \PHPUnit_Extensions_Selenium2TestCase { | |
protected function setUp() { | |
$this->setBrowser( 'phantomjs' ); | |
$this->setBrowserUrl( 'http://www.example.com/' ); | |
$this->run_selenium_server(); | |
$this->run_phantom_js(); | |
} |
This file contains 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
import DS from 'ember-data'; | |
import Ember from 'ember'; | |
var inflector = Ember.Inflector.inflector; | |
inflector.irregular('person', 'people'); | |
inflector.singular(/person/, 'person'); | |
let Person = DS.Model.extend({ | |
fullName: DS.attr( 'string' ), |
This file contains 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
{ | |
"people": [ | |
{ | |
"name": "Oliver Oldham", | |
"location": "Sydney Australia", | |
"description": "Enterprise Technologist in Cloud and Infrastructure. General Manager of the Cloud Practice @ Telstra, critical thinker and Jumps from perfectly good planes.", | |
"photo": "https://pbs.twimg.com/profile_images/422596819260936192/EAHtLc78_normal.jpeg" | |
}, | |
{ | |
"name": "Tim Love", |
This file contains 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": "followerwonk", | |
"count": 50, | |
"url": "https://followerwonk.com/bio/?q=Redacted&q_type=all&l=Sydney", | |
"results": { | |
"people": [ | |
{ | |
"name": "[Name redacted]", | |
"location": "Sydney Australia", | |
"description": "Enterprise Technologist in Cloud and Infrastructure. General Manager of the Cloud Practice @ Telstra, critical thinker and Jumps from perfectly good planes.", |
This file contains 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
import DS from 'ember-data'; | |
import config from '../config/environment'; | |
var counter = 1; | |
export default DS.RESTSerializer.extend({ | |
extractSingle: function(store, type, payload, id) { | |
var people = payload.results.people; | |
payload = { |
This file contains 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
//get details for this user | |
userResp = getUrl(("https://crm.zoho.com/crm/private/xml/Users/getUsers?authtoken=AUTHTOKEN&scope=crmapi&type=ActiveUsers")); | |
info userResp; | |
users = userResp.executeXPath("/users/user"); | |
if ((users != null) && (users != "")) { | |
userList = users.toList("-|-"); | |
for each user in userList { | |
idNode = user.executeXPath("/user/@id"); | |
id = idNode.executeXPath("/id/text()"); | |
if (id == ownerId) { |
This file contains 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 update_vendor_lookup (int finance_equity_id) | |
finance_equity_obj = zoho.crm.getRecordById("CustomModule4", finance_equity_id); | |
lender_string = finance_equity_obj.get("Lender"); | |
lender_id = 0; | |
if (lender_string.contains("Adelaide")){ | |
//figure out appropriate lookup value based on picklist | |
lender_id = 1002375000002270019; | |
} | |
This file contains 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
//trick to do a while loop in Deluge script | |
lst_iterator = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}; | |
for each iterator in lst_iterator{ | |
//can get 200 records at a time. range is like 1-200, 201-300, etc. | |
start_index = 200 * iterator + 1; | |
end_index = start_index + 199; | |
//find leads that don't have updated notes | |
leads_without_updated_notes = zoho.crm.searchRecords("Leads", "(Notes migrated|=|false)", start_index, end_index); | |
for each lead in leads_without_updated_notes | |
{ |
This file contains 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
potential_obj = zoho.crm.getRecordById("Potentials", potential_id); | |
related_products = zoho.crm.getRelatedRecords("Products", "Potentials", potential_id.toString(), 1,200); | |
total_amount = 0.0; | |
for each product in related_products { | |
total_amount = total_amount + product.get("Unit Price").toDecimal(); | |
} | |
potential_obj.put("Amount", total_amount); | |
potential_obj.put("Populate amount based on products associated", false); |
OlderNewer