davispeixoto / Laravel-5-Salesforce

Laravel 5 wrapper for Salesforce Force.com Toolkit SOAP API
MIT License
47 stars 36 forks source link

INVALID_TYPE: Must send a concrete entity type. #22

Closed Lam784 closed 7 years ago

Lam784 commented 7 years ago

Hey Davis,

I am trying to create an opportunity in salesforce, and I am getting this error: 'INVALID_TYPE: Must send a concrete entity type.'.

I am not too familiar with the enterprise client, and I couldn't find a solution on Google, can you spot anything wrong with my code? Because the they querying works, but not the create();

Here is my code: $sfOpportunity = new \stdClass(); $sfOpportunity->AccountId = $accountId; $sfOpportunity->Name = $oppName; $sfOpportunity->StageName = $stageName; $sfOpportunity->CloseDate = $closeDate; $sfOpportunity->Type = $type; $sfOpportunity->CampaignId = $campaignId; $sfOpportunity->OwnerId = $ownerId;

        $result = $this->create(array($sfOpportunity), "Opportunity");
davispeixoto commented 7 years ago

Hi @Lam784 . Are you using PHP 7+?

If yes, then here you can find an answer: https://github.com/developerforce/Force.com-Toolkit-for-PHP/pull/49

It is with the underlying works for runtime pointers when iterating over arrays.

https://github.com/developerforce/Force.com-Toolkit-for-PHP/pull/49

Check and reply, please.

Lam784 commented 7 years ago

Yup, that fixed it, thanks!

nicklee1990 commented 7 years ago

@davispeixoto just ran into this today. how do we actually resolve this error? from looking at the issue im not actually sure what to do?

davispeixoto commented 7 years ago

Check the installation. Probably you are missing to declare and configure properly at setup file

On Jan 7, 2017 23:50, "nicklee1990" notifications@github.com wrote:

@davispeixoto https://github.com/davispeixoto just ran into this today. how do we actually resolve this error? from looking at the issue im not actually sure what to do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davispeixoto/Laravel-5-Salesforce/issues/22#issuecomment-271123375, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD8jgf3lgrvaZA9pIR-UZTETTMJBbALks5rQEDJgaJpZM4LI_0l .

nicklee1990 commented 7 years ago

which installation? I've got the latest version of davispeixoto/laravel5-salesforce.

I think https://github.com/davispeixoto/Force.com-Toolkit-for-PHP need a new release to make the latest commits available? And this package would need a composer.json update "davispeixoto/force-dot-com-toolkit-for-php": "1.0.*", to "davispeixoto/force-dot-com-toolkit-for-php": "~1.0.*",

nicklee1990 commented 7 years ago

I just tested ^^^ locally using forks of your libs and my suggestion works. it seems there was some commits to https://github.com/davispeixoto/Force.com-Toolkit-for-PHP which fixed this issue but they were not released. Once they are released, and the composer.json for this library is updated to pull in the new release (which I assume would be 1.1.0), it will work

davispeixoto commented 7 years ago

I will double check this by Tuesday only. But I was referring to laravel5 salesforce package installation. It does change across versions

On Jan 8, 2017 00:21, "nicklee1990" notifications@github.com wrote:

which installation? I've got the latest version of davispeixoto/laravel5- salesforce.

doesn't https://github.com/davispeixoto/Force.com-Toolkit-for-PHP need a new release to make the latest commits available? And this package would need a composer.json update "davispeixoto/force-dot-com-toolkit-for-php": "1.0.", to "davispeixoto/force-dot-com-toolkit-for-php": "~1.0.",

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davispeixoto/Laravel-5-Salesforce/issues/22#issuecomment-271124526, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD8jtuICqk6OnRFeuUJP-V4YJ4pMAy9ks5rQEg6gaJpZM4LI_0l .

nicklee1990 commented 7 years ago

cool - thanks!. it looks like https://github.com/davispeixoto/Force.com-Toolkit-for-PHP/pull/2 fixed the issue but never got released btw

davispeixoto commented 7 years ago

Alright, thx for the quick update. Thus I can check on this tomorrow morning. It almost 1 am here in Brazil and I would not like to wake up my children

On Jan 8, 2017 00:26, "Davis Peixoto" davis.peixoto@gmail.com wrote:

I will double check this by Tuesday only. But I was referring to laravel5 salesforce package installation. It does change across versions

On Jan 8, 2017 00:21, "nicklee1990" notifications@github.com wrote:

which installation? I've got the latest version of davispeixoto/laravel5-salesforce.

doesn't https://github.com/davispeixoto/Force.com-Toolkit-for-PHP need a new release to make the latest commits available? And this package would need a composer.json update "davispeixoto/force-dot-com-toolkit-for-php": "1.0.", to "davispeixoto/force-dot-com-toolkit-for-php": "~1.0.",

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davispeixoto/Laravel-5-Salesforce/issues/22#issuecomment-271124526, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD8jtuICqk6OnRFeuUJP-V4YJ4pMAy9ks5rQEg6gaJpZM4LI_0l .

nicklee1990 commented 7 years ago

haha no problem! hope you manage to get some sleep!

davispeixoto commented 7 years ago

Sorry for the delay, folks.

I've published the pull request #2.

davispeixoto commented 7 years ago

@nicklee1990 , please send me your personal email at @DavisPeixoto at twitter, plz.