-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
2Replies
Select statement works in Salesforce Dev console but not when run through my php file
I need to creat a select statement that will pull the first name, last name, and title of all the people who have signed up for a specific event in salesforce. To do this I built the following statement:
This statement works just fine when I put the statement into my php file and run it I get the following error statements:
Line 34, 35, and 36 are where I print the results to the screen. This leads me to believe that the root cause of the problem is the first error, the only problem is I do not understand why I am getting that error.
SELECT Contact.FirstName, Contact.LastName, Contact.Title FROM CampaignMember WHERE CampaignId='701i00000010q96'
This statement works just fine when I put the statement into my php file and run it I get the following error statements:
PHP Notice: Undefined variable: record in C:\Sites\s2s\htdocs\tech_demo\salesForce\soapclient\SforceBaseClient.php on line 973 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 34 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 34 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 35 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 35 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 36 PHP Notice: Trying to get property of non-object in C:\Sites\s2s\htdocs\tech_demo\test.php on line 36
Line 34, 35, and 36 are where I print the results to the screen. This leads me to believe that the root cause of the problem is the first error, the only problem is I do not understand why I am getting that error.
-
- S2S CRM Admin
- June 28, 2016
- Like
- 0
- Continue reading or reply
View volunteer jobs by campaign
I am using the NPSP and I am trying to write a select statement that will gather all of the events that are part of a single campaign.
I have come up with the following statement:
When I run this statement I recieve the following error:
When I look on the schema, it shows Campaign as part of the object, and from the research that I have done I know that I am allowed to view the campaign information. What exactly am I doing incorrectly?
I have come up with the following statement:
SELECT Name from GW_Volunteers__Volunteer_Job__c WHERE Campaign='701i00000010q96'
When I run this statement I recieve the following error:
PHP Fatal error: Uncaught SoapFault exception: [sf:INVALID_FIELD] INVALID_FIELD: GW_Volunteers__Volunteer_Job__c WHERE Campaign='701i00000010q96' ^ ERROR at Row:1:Column:56 No such column 'Campaign' on entity 'GW_Volunteers__Volunteer_Job__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php:808 Stack trace: #0 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SoapClient->__call('query', Array) #1 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SforceSoapClient->query(Array) #2 C:\Sites\s2s\htdocs\test.php(27): SforceBaseClient->query('SELECT Name fro...') #3 {main} thrown in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php on line 808
When I look on the schema, it shows Campaign as part of the object, and from the research that I have done I know that I am allowed to view the campaign information. What exactly am I doing incorrectly?
-
- S2S CRM Admin
- June 23, 2016
- Like
- 0
- Continue reading or reply
Get the FirstName from the CampaignMember Object
I am attempting to create a select statement that will pull all the first names of members that are signed up to a specific campaign. I am relatively new to using the Salesforce API so I decided to simplify it and just try to pull the first name of any member of any campaign. I wrote the following code:
I did confirm that all user profiles are allowed to view the CampaignMember object. From what research I have done I discovered that Salesforce use to have this bug. Has this been patched out, or is there another reason I am recieving the error?
SELECT FirstName FROM CampaignMemberWhen I run the statement I recieve the following error:
PHP Fatal error: Uncaught SoapFault exception: [sf:INVALID_FIELD] INVALID_FIELD: SELECT FirstName FROM CampaignMember ^ ERROR at Row:1:Column:8 No such column 'FirstName' on entity 'CampaignMember'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php:808 Stack trace: #0 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SoapClient->__call('query', Array) #1 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SforceSoapClient->query(Array) #2 C:\Sites\s2s\htdocs\test.php(28): SforceBaseClient->query('SELECT FirstNam...') #3 {main} thrown in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php on line 808
I did confirm that all user profiles are allowed to view the CampaignMember object. From what research I have done I discovered that Salesforce use to have this bug. Has this been patched out, or is there another reason I am recieving the error?
-
- S2S CRM Admin
- June 22, 2016
- Like
- 0
- Continue reading or reply
View volunteer jobs by campaign
I am using the NPSP and I am trying to write a select statement that will gather all of the events that are part of a single campaign.
I have come up with the following statement:
When I run this statement I recieve the following error:
When I look on the schema, it shows Campaign as part of the object, and from the research that I have done I know that I am allowed to view the campaign information. What exactly am I doing incorrectly?
I have come up with the following statement:
SELECT Name from GW_Volunteers__Volunteer_Job__c WHERE Campaign='701i00000010q96'
When I run this statement I recieve the following error:
PHP Fatal error: Uncaught SoapFault exception: [sf:INVALID_FIELD] INVALID_FIELD: GW_Volunteers__Volunteer_Job__c WHERE Campaign='701i00000010q96' ^ ERROR at Row:1:Column:56 No such column 'Campaign' on entity 'GW_Volunteers__Volunteer_Job__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php:808 Stack trace: #0 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SoapClient->__call('query', Array) #1 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SforceSoapClient->query(Array) #2 C:\Sites\s2s\htdocs\test.php(27): SforceBaseClient->query('SELECT Name fro...') #3 {main} thrown in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php on line 808
When I look on the schema, it shows Campaign as part of the object, and from the research that I have done I know that I am allowed to view the campaign information. What exactly am I doing incorrectly?
- S2S CRM Admin
- June 23, 2016
- Like
- 0
- Continue reading or reply
Get the FirstName from the CampaignMember Object
I am attempting to create a select statement that will pull all the first names of members that are signed up to a specific campaign. I am relatively new to using the Salesforce API so I decided to simplify it and just try to pull the first name of any member of any campaign. I wrote the following code:
I did confirm that all user profiles are allowed to view the CampaignMember object. From what research I have done I discovered that Salesforce use to have this bug. Has this been patched out, or is there another reason I am recieving the error?
SELECT FirstName FROM CampaignMemberWhen I run the statement I recieve the following error:
PHP Fatal error: Uncaught SoapFault exception: [sf:INVALID_FIELD] INVALID_FIELD: SELECT FirstName FROM CampaignMember ^ ERROR at Row:1:Column:8 No such column 'FirstName' on entity 'CampaignMember'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php:808 Stack trace: #0 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SoapClient->__call('query', Array) #1 C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php(808): SforceSoapClient->query(Array) #2 C:\Sites\s2s\htdocs\test.php(28): SforceBaseClient->query('SELECT FirstNam...') #3 {main} thrown in C:\Sites\s2s\htdocs\salesForce\soapclient\SforceBaseClient.php on line 808
I did confirm that all user profiles are allowed to view the CampaignMember object. From what research I have done I discovered that Salesforce use to have this bug. Has this been patched out, or is there another reason I am recieving the error?
- S2S CRM Admin
- June 22, 2016
- Like
- 0
- Continue reading or reply