• sf_dave
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 24
    Replies

Hi Everyone,

 

I've created a Visualforce page allowing someone that is a member of a campaign to visit the page as a RSVP for them attending the event.

 

The problem is I need to email each contact a link with their CampaignMember Id so they can click on a link like:

http://oursite.force.com/attend?id=xxxxxxxxxxxx

 

The problem is I'm having a heck of a time getting the {!CampaignMember.Id} field in the email I created to get replaced with the users CampaignMember id.

 

I've created the email template with a link that has this as the query string:

?id={!CampaignMember.Id}

 

and I've tried both the "Send Test and Verify Merge Fields" button on the email as well as adding myself as a contact to the actual campaign, going through Contacts->Mass Email Contacts, creating a view that contains just myself and is tied to the campaign in Salesforce and sending out the "batch" email to myself. 

 

Both methods result in me receiving an email with a link that looks like:

http://oursite.force.com/attend?id=

 

Any insight on how to mass email members of a campaign and sending a link with their CampaignMember id would be appreciated!!

 

Best,

-Dave

Hi All,

We are considering rolling our web page's registration process into web-to-lead, however I'm curious what happens with web-to-lead during scheduled Salesforce maintenance, or, unscheduled down times?

Are these leads queued to a different server or somehow stored and held until the system is back online or are they just lost?

Any insight as to how this is handled would be appreciated!

Thanks,
-Dave
I'm having a problem where the convertedStatus (which used to work) is always being set to Prospect instead of Qualified.

Our integration's LeadConvert object sets the following:
convertedStatus           => 'Qualified',
leadId                    => 'XXXXXXXXXXXXXXXXXXXXX',
opportunityName           => 'My Opportunity',
CreateUser                => 'XXXXXXXXXX',
ownerId                   => 'XXXXXXXXXX',
doNotCreateOpportunity    => 0,
overwriteLeadSource       => 0,
sendNotificationEmail     => 1


However after the lead is converted into Account, Opportunity, Contact, the Opportunity still says Prospect as its Stage.  I can change the Stage to Qualified in a subsequent update but it leaves the Prospect stage in the Stage History.

Any insight is appreciated.

-Dave
Hi Everyone,

We imported all our data but accidentially mis-set the close date on our Closed Won opportunities.  Does anyone know if you can delete the stage history for Opportunities?  I've tried through the PHP API but receive "entity type cannot be deleted" when I try to delete the item.

Can we manually delete / massage our stage history or do we have to delete the entire Opportunity and re-add it.  That seems to be overkill just to purge the stage history and start fresh.

Thanks
-Dave
All,

I'm wrapping up our initial integration with Salesforce where we can "push" data to salesforce based on certain triggers in our existing PHP based web portal.  This has essentially created 1 way communication from our portal to Salesforce.

My question is what is the best way to have Salesforce "push" data to our web app?  I've dug around the Wiki some but most of the API tutorials are all about getting data into salesforce.  I'm now ready for Salesforce to push data to us.

Things like "When you update an Account, send the updated account info to our web application"

Where are the best resources that (technically) describe how to do this with Salesforce / Apex?

Many thanks in advance!
-Dave
All,

The existing web portal I'm integrating with Salesforce has primary keys in a table that I use as the External ID in Salesforce.  Our web portal, however, CHANGES some of these primary keys.  Note these keys do remain unique, but I was wondering if there is a way in salesforce to change these External IDs through upsert.

I assume through update I could just
update Contact set CompanyId__c=100 where CompanyId__c=75;

but I was hoping I could modify this through an upsert some how.

1. Is that possible?
2. If I can't do this through upsert, how would one do it?

Thanks
-Dave
All,

I can successfully call convertLead() on a lead I generate from the PHP API.  Upon successful conversion to an account, opportunity, and contact I update our local copies of the Salesforce ID so I can later upsert to the same account.

The problem is when I try to upsert on the converted account passing the ID returned by convertLead I get the following result returned from the API:

Code:
stdClass Object
(
    [created] => 1
    [errors] => stdClass Object
        (
            [fields] => Id
            [message] => cannot specify Id in an insert call
            [statusCode] => INVALID_FIELD_FOR_INSERT_UPDATE
        )

    [id] =>
    [success] =>
)

So I figured I should just remove the ID returned from the Salesforce API and pass my External ID to the upsert call and it will update the existing account, but it doesn’t.

It creates a second account that I can then upsert on infinity times using the ID returned from the upsert call.

Is there something wrong with the ID’s returned for accounts made through convertLead or are there any special steps I need to take to update the resulting account / opportunity / contact?

Thanks
-Dave

Hi Everyone,

I'm integrating our existing web portal with Salesforce and we have a "lead capture form" that creates leads in Salesforce from our website with out any problems.

I'm wondering if I even need to then mess with the convertLead API call when I can just manually delete the lead and create our custom hierarchy by hand (Account, Opportunity, Contact).

Do you gain any intrinsic data cohesion by converting a lead to an account or is the API doing exactly what I'm proposing for you?

Thanks,
-Dave

 

I have created a mapping in my pre-existing objects to the fields Salesforce is expecting.  The problem is that there are extra members in my objects that Salesforce seems to be stumbling on.

In this example I have a User object which maps Notes to Description so when salesforce asks for $sobject->Description it actually returns the Notes member of our User object.  The problem is it throws an exception:
SoapFault Object ( [message:protected] => INVALID_FIELD: No such column 'Notes' on entity 'contact'

Like it's iterating over EVERY class member and validating it on what the WSDL says should be there.  Is it wrong to have Extra members in the Sobjects we send via the php api?

Thanks
-Dave
I have finished integrating the Salesforce API into our web app and have started testing the capabilities of upsert.  I created a simple mapping from our Accounts to a Salesforce Account SObject and tried to upsert it with the correct External ID I specified on our account form.

it wasn't adding the account so I traced out what variables the API was trying to access in the __get method of my mapping.  It turns out the API was always asking for the fields in the Contact Object!!

I looked at the code for upsert in the SforceEnterpriseClient.php from the 1.1.1 SDK and found this:
Code:
  public function upsert($ext_Id, $sObjects) {
    $this->_setSessionHeader();
    $arg = new stdClass;
    $arg->externalIDFieldName = new SoapVar($ext_Id, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
    foreach ($sObjects as &$sObject) {
      $sObject = new SoapVar($sObject, SOAP_ENC_OBJECT, 'Contact', "urn:sobject.enterprise.soap.sforce.com");
    }
    $arg->sObjects = $sObjects;
    return $this->sforce->upsert($arg)->result;
  }

 
Note the line:
$sObject = new SoapVar($sObject, SOAP_ENC_OBJECT, 'Contact', ....

Why is the Contact object hard coded in the upsert call?  I thought it determined what object it was base don the External ID pased to the API?? In my case this is CompanyId__c

Is there something explicitly wrong going on here?

Thanks
-Dave


Message Edited by sf_dave on 01-02-2008 09:54 PM
I'm wrapping the PHP  API and I would like to upsert for both create and update calls from our external application, however I'm a little baffled how salesforce knows what you are trying to upsert based on an external id.

Can't I create a custom field in Account's named "MyID" and a second custom field in Contacts called "MyID"?

And at this point how would salesforce know what i'm talking about when i say
$salesforce->upsert("MyID__c", $objects);

Thanks
-Dave
Hi All,

We are considering rolling our web page's registration process into web-to-lead, however I'm curious what happens with web-to-lead during scheduled Salesforce maintenance, or, unscheduled down times?

Are these leads queued to a different server or somehow stored and held until the system is back online or are they just lost?

Any insight as to how this is handled would be appreciated!

Thanks,
-Dave
I'm trying to check and see if the contact exists first before adding an Oppurtunity entry. What's the best way to do this. I'm new to Salesforce by the way but I've been working on the API.
  • June 16, 2008
  • Like
  • 0
Hi Everyone,

We imported all our data but accidentially mis-set the close date on our Closed Won opportunities.  Does anyone know if you can delete the stage history for Opportunities?  I've tried through the PHP API but receive "entity type cannot be deleted" when I try to delete the item.

Can we manually delete / massage our stage history or do we have to delete the entire Opportunity and re-add it.  That seems to be overkill just to purge the stage history and start fresh.

Thanks
-Dave
Hi :
  So I loaded php toolkit to the hosting server that I have online... I get an error trying to start it

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/domain/public_html/sfdc/samples/header.inc:9) in /home/domain/public_html/sfdc/samples/login.php on line 30

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/domain/public_html/sfdc/samples/header.inc:9) in /home/domain/public_html/sfdc/samples/login.php on line 30
 
Does anyone know where I am going wrong???
Am I suppose to do something?
 
I did test out the report/index.html and got no errors and place my salesforce login...
SforcePartnerClientTest this works out....
 
Thanks
Shan
 
 
 
All,

I'm wrapping up our initial integration with Salesforce where we can "push" data to salesforce based on certain triggers in our existing PHP based web portal.  This has essentially created 1 way communication from our portal to Salesforce.

My question is what is the best way to have Salesforce "push" data to our web app?  I've dug around the Wiki some but most of the API tutorials are all about getting data into salesforce.  I'm now ready for Salesforce to push data to us.

Things like "When you update an Account, send the updated account info to our web application"

Where are the best resources that (technically) describe how to do this with Salesforce / Apex?

Many thanks in advance!
-Dave
Hi,
I have a series of checkboxes in a form represented by a single multi-select picklist field in Salesforce. When I submit the lead, it looks like the values are sent as one single value that gets cut off after 40 characters. How can I report each value individually yet have them be part of the same field.

Thanks for any ideas.
Roger

The html:

Code:
* Current Version Control Solution (please select as many as apply):<br />
<input name="choices[]" value="Accurev" type="checkbox"  />&nbsp;Accurev <br>
<input name="choices[]" value="IBM Rational ClearCase" type="checkbox" />&nbsp;IBM Rational ClearCase<br>
<input name="choices[]" value="Perforce" type="checkbox" />&nbsp;Perforce<br>
<input name="choices[]" value="Bitkeeper" type="checkbox" />&nbsp;Bitkeeper<br>

The php:
Code:
$clean['choices'] = $_POST['choices'];
$choices = array();
$choices = $clean['choices'];
if (count($choices) > 0) {  
for ($i=0;$i<count($choices);$i++)
    {  
        $salesforce_data['00N30000001rpAQ'] .= "$choices[$i]";
    }  
}

 



Message Edited by FlickerboxRoger on 02-11-2008 03:35 PM
All,

The existing web portal I'm integrating with Salesforce has primary keys in a table that I use as the External ID in Salesforce.  Our web portal, however, CHANGES some of these primary keys.  Note these keys do remain unique, but I was wondering if there is a way in salesforce to change these External IDs through upsert.

I assume through update I could just
update Contact set CompanyId__c=100 where CompanyId__c=75;

but I was hoping I could modify this through an upsert some how.

1. Is that possible?
2. If I can't do this through upsert, how would one do it?

Thanks
-Dave
All,

I can successfully call convertLead() on a lead I generate from the PHP API.  Upon successful conversion to an account, opportunity, and contact I update our local copies of the Salesforce ID so I can later upsert to the same account.

The problem is when I try to upsert on the converted account passing the ID returned by convertLead I get the following result returned from the API:

Code:
stdClass Object
(
    [created] => 1
    [errors] => stdClass Object
        (
            [fields] => Id
            [message] => cannot specify Id in an insert call
            [statusCode] => INVALID_FIELD_FOR_INSERT_UPDATE
        )

    [id] =>
    [success] =>
)

So I figured I should just remove the ID returned from the Salesforce API and pass my External ID to the upsert call and it will update the existing account, but it doesn’t.

It creates a second account that I can then upsert on infinity times using the ID returned from the upsert call.

Is there something wrong with the ID’s returned for accounts made through convertLead or are there any special steps I need to take to update the resulting account / opportunity / contact?

Thanks
-Dave

Hi Everyone,

I'm integrating our existing web portal with Salesforce and we have a "lead capture form" that creates leads in Salesforce from our website with out any problems.

I'm wondering if I even need to then mess with the convertLead API call when I can just manually delete the lead and create our custom hierarchy by hand (Account, Opportunity, Contact).

Do you gain any intrinsic data cohesion by converting a lead to an account or is the API doing exactly what I'm proposing for you?

Thanks,
-Dave

 

I have created a mapping in my pre-existing objects to the fields Salesforce is expecting.  The problem is that there are extra members in my objects that Salesforce seems to be stumbling on.

In this example I have a User object which maps Notes to Description so when salesforce asks for $sobject->Description it actually returns the Notes member of our User object.  The problem is it throws an exception:
SoapFault Object ( [message:protected] => INVALID_FIELD: No such column 'Notes' on entity 'contact'

Like it's iterating over EVERY class member and validating it on what the WSDL says should be there.  Is it wrong to have Extra members in the Sobjects we send via the php api?

Thanks
-Dave
Hi everyone,

I am doing some development with the PHP toolkit. 
Currently, on every page I make, I use the standard client login() function to create a connection to Salesforce.

My questions:
 
1)  Is the login() function strong enough to handle a large-scale application with thousands of concurrent users?  
 
2)  If the login() function is not the way to go about it, then what is the best way? 

I should elaborate that my users will be using my application to update the Salesforce database themselves.

Thanks


Message Edited by CarteBlanche on 01-03-2008 11:54 AM
I have finished integrating the Salesforce API into our web app and have started testing the capabilities of upsert.  I created a simple mapping from our Accounts to a Salesforce Account SObject and tried to upsert it with the correct External ID I specified on our account form.

it wasn't adding the account so I traced out what variables the API was trying to access in the __get method of my mapping.  It turns out the API was always asking for the fields in the Contact Object!!

I looked at the code for upsert in the SforceEnterpriseClient.php from the 1.1.1 SDK and found this:
Code:
  public function upsert($ext_Id, $sObjects) {
    $this->_setSessionHeader();
    $arg = new stdClass;
    $arg->externalIDFieldName = new SoapVar($ext_Id, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema');
    foreach ($sObjects as &$sObject) {
      $sObject = new SoapVar($sObject, SOAP_ENC_OBJECT, 'Contact', "urn:sobject.enterprise.soap.sforce.com");
    }
    $arg->sObjects = $sObjects;
    return $this->sforce->upsert($arg)->result;
  }

 
Note the line:
$sObject = new SoapVar($sObject, SOAP_ENC_OBJECT, 'Contact', ....

Why is the Contact object hard coded in the upsert call?  I thought it determined what object it was base don the External ID pased to the API?? In my case this is CompanyId__c

Is there something explicitly wrong going on here?

Thanks
-Dave


Message Edited by sf_dave on 01-02-2008 09:54 PM

Hi,

My problem is
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /***/soapclient/SforceBaseClient.php:113
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://www.sal...', '', 1, 0)
#1 [internal function]: SoapClient->__call('login', Array)
#2 /***/soapclient/SforceBaseClient.php(113): SoapClient->login(Array)
#3 /***/test.php(7): SforceBaseClient->login('username@domain...', 'mypassword')
#4 {main} thrown in /***/soapclient/SforceBaseClient.php on line 113

Settings:
Apache/1.3.37 (Unix)
PHP 5.2.1

curl
cURL support  enabled 
cURL Information  libcurl/7.16.1 OpenSSL/0.9.7e zlib/1.2.3 

openssl
OpenSSL support  enabled 
OpenSSL Version  OpenSSL 0.9.7e-p1 25 Oct 2004 

soap
Soap Client  enabled 
Soap Server  enabled 
Directives
soap.wsdl_cache 1
soap.wsdl_cache_dir /tmp
soap.wsdl_cache_enabled 1
soap.wsdl_cache_limit 5
soap.wsdl_cache_ttl 86400

php.ini
allow_url_fopen = On

Same script is working from my local computer (apache 2.2, php 5.2.3 on windows) with exactly same settings.
I don't see any requirement about Apache version as long as PHP 5 works but it is the only difference beside windows - unix?

Thanks for helping!

Suat