Git Product home page Git Product logo

cakephp-salesforce's Introduction

Hey there 👋

Linkedin Badge Medium Badge

I'm Dan, CTO, Blockchain enthusiast & all round technologist. I have around 20 years experience as a developer both as a company owner and as a wage slave.

Unfortunately, My days of knocking out lines of code regularly are long behind me, but am still doing awesome things with amazing people as a technology leader, delivering projects often using bleeding edge technologies.

I am however still hands-on in a lot of different things, especially around infrastructure and data engineering.


Technologies:

Cloud          Amazon AWS Google Cloud Azure

DevOps       Serverless Kubernetes Docker Ansible Git

Big Data      BigQuery Snowflake CUDA Presto spark Hadoop QuestDB DASK

GIS               BigQuery Presto QGIS

Data             BigQuery Snowflake Airflow CUDA spark

IoT & IIoT     Adafruit MQTT MQTT Eclipse Mosquitto IFTTT

Code            SQL Python php Nodejs CakePHP Laravel Flask Django Bash

Blockchain   Hedera Python


Github Stats:

cakephp-salesforce's People

Contributors

voycey avatar zuluru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cakephp-salesforce's Issues

Cake 3.3 compatibility

Looks like some bits of this don't work with Cake 3.3. I've done a PR for some easy fixes, but have additional things I'm not sure how to fix. Happy to work towards resolving those, but don't have experience with ORM internals, so I have some questions to get me going in the right direction. What's the best way to ask them? Here? Email? Skype?

table salesforce_contacts missing

Hello there,

first off thank you for this quick and slick easy-to-install plugin; however, it seems that the correct datasource is not being utilized although i am assigning SalesforceSource in the app/Config/database.php as datasource. i'm getting:

Error: Table salesforce_contacts for model SalesforceContact was not found in datasource default.

am i missing anything? i'm sure i've followed all instructions on the readme. is it possible that the datasource variable name $sflive should be renamed to $_baseConfig? (first time i install a plugin on Cakephp 2.0 - im upgrading an existing cakephp site).

thanks,
/avz

Help on TLS

Hi Dan,

We need your help in solving TLS upgrading issue with CakePHP and Soap.

Does your CakePHP 2.x salesforce plugin is compatible with TLS 1.2?

If yes then please let us know what are the other places where we need to make code change for upgrading TSL 1.0 to TLS 1.2

Thanks,
Inderjeet

Record ID not returned in the result

Hello there,

first off i can't thank you enough for this plugin, it was easy to integrate and pretty straight forward. However, although it's not a bug, but probably something im incapable of doing.

we both know Salesforce returns the ID of the record once we create a new record on the SF database, however, i get null. in the logs, i find that this ID is dumped from the file /Plugin/Salesforce/Model/Datasource/SalesforceSource.php line 207.

try {
                $response = $this->client->create(array($data), $model->name);` 
                $this->log("before response");
                $this->log($response);
                $this->log("after response");
            } catch (Exception $e) {
                $response->errorMessages = array($e->faultstring, $this->client->getLastRequest());
                $this->log("Error in Create: ". $response->errorMessages);
                return false;
            }

            return ($response); //This should return the ID of the created record?

The returned value is in fact the ID of the inserted record, but in my controller when i add a new Contact, the result is a null:

//now, add the user as Contact on Salesforce
			$this->loadModel('Salesforce.SalesforceContact');
			$this->SalesforceContact->create();
            $crm_data = array(
                "SalesforceContact" =>
	                array(
	                    'FirstName' => $data['User']['first_name'],
	                    'LastName' => $data['User']['last_name'],
	                    'Phone' => $data['User']['phone'],
	                    'MailingStreet' => $data['User']['address'],
	                    'MailingCountry' => "Country",
	                    'Email' => $data['User']['email'],
	                    'LeadSource' => 'website',
	                    'Stage__c' => 'Lead',
	                    'TDHC_Webpage_Source__c' => 'contact',
	                    'Website_Counter__c' => $insert_id,
	                    'UTM_Campaign__c' => $data['User']['UTM_Campaign__c'],
	                    'UTM_Content__c' => $data['User']['UTM_Content__c'],
	                    'UTM_Medium__c' => $data['User']['UTM_Medium__c'],
	                    'UTM_Source__c' => $data['User']['UTM_Source__c'],
	                    'UTM_Term__c' => $data['User']['UTM_Term__c'],
	                )
            );
            $crm_result = $this->SalesforceContact->saveAll($crm_data);
            $this->log($crm_result);

what could be wrong? the result in the LOG file is as per the below:

2016-12-16 18:38:15 Error: before response
2016-12-16 18:38:15 Error: Array
(
    [0] => stdClass Object
        (
            [id] => 0032XXXXXXXXb0qAAA
            [success] => 1
        )

)

2016-12-16 18:38:15 Error: after response
2016-12-16 18:38:15 Error: 

See the last line? that's the empty $crm_result, but the previous Datasource file is dumping the correct value.

thanks,
Amjo

Error when using example code

Hi,

I am trying this plugin with CakePHP 3.x but I am stuck at this error while using the example code you have in readme. Below is the error message I am getting

Error: Uncaught Error: Using $this when not in object context in /home/jj/testproject/vendor/voycey/cakephp-salesforce/src/Database/SalesforceQuery.php:54 Stack trace: #0 /home/jj/testproject/vendor/voycey/cakephp-salesforce/src/ORM/SalesforceQuery.php(63): Salesforce\Database\SalesforceQuery::sql(NULL, Object(Salesforce\ORM\SalesforceQuery)) #1 /home/jj/testproject/vendor/voycey/cakephp-salesforce/src/Database/Statement/SalesforceStatement.php(37): Salesforce\ORM\SalesforceQuery->sql() #2 /home/jj/testproject/vendor/cakephp/cakephp/src/Database/Statement/StatementDecorator.php(174): Salesforce\Database\Statement\SalesforceStatement->execute(NULL) #3 /home/jj/testproject/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php(56): Cake\Database\Statement\StatementDecorator->execute(NULL) #4 /home/jj/testproject/vendor/voycey/cakephp-salesforce/src/Database/SalesforceConnection.php(64): Cake\Database 
File /home/jj/testproject/vendor/voycey/cakephp-salesforce/src/Database/SalesforceQuery.php 
Line: 54

Any help is much appreciated.

Thanks for developing this package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.