• Kevin Davis
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies

Hi there,

 

Right now I created a php upsert program that upserts data into salesforce. The problem I'm having is the created by field. Is there a way not show my name but show the name based on the user id that I upload into saleforce? Salesforce says that can't be editable is that correct?

 

Thank you,

Kevin 

Hi there,

 

I would like to know if there is a way to link a webshop with Salesforce? Is that possilble? If so how??

 

Thanks!

Hi there,

 

How would I display data that I have retrieved data from the object using the for loop.

 

Thank you,

Kevin

Hi there,

 

I have another question with the upsert.  I'm doing another upsert, however, it requries a parent field. I tried the following code (for the database call of course) Parent:Org_Id.. What would be the best solution to upsert the id in Salesforce? 

 

Thanks!

Hi there,

 

I'm seem to be having a problem with the PHP Upsert Limit.

 

Here is the situtation. I have a dataset with records over 200. Is there a way to override the limit?

 

Here is the code so far:

 

while ($record_count == $number_records)  

{

  set_time_limit(20);

 {$data_set = mysql_query("SELECT * from table_name") or die (mysql_error());}

 $data_count=mysql_num_rows($data_set);   

 

 $all_fields = array();
  $i = 0;

while ($data_1 = mysql_fetch_assoc($data_set))
  {
     $all_fields[$i]['RecordTypeId']                    = $data_1['field1'];
     $all_fields[$i]['STB_Organization_ID__c']          = $data_1['field2'];
     $all_fields[$i]['Branch_Site_ID__c']               = $data_1['field3'];
    
     $i++;
   }

 

 $record_count = $i;
  $sObjects = array();

   foreach ($all_fields as $fieldset)
   {
     $sObject = new sObject();
     $sObject->type = 'Account'; // Salesforce Table or object that you will perform the upsert on
     $sObject->fields = $fieldset;
     array_push($sObjects, $sObject);
   }
 
   
   $success = upsert_accounts($client, $sObjects, $file_updated, $file_created, $file_failed);

    if (is_array($success))
    {
    
      $accounts_created = $accounts_created + $success[0];
      $accounts_updated = $accounts_updated + $success[1];
      $accounts_failed =  $accounts_failed + $success[2];
      
    }

 

    $starting_record = $starting_record + $number_records;
    
    ob_start();    
    $total_record_count = $total_record_count + $record_count;
    echo $total_record_count." records processed.<br />";
    ob_end_flush();

 

 

}

Hi there,

 

I'm seem to be having a problem with the PHP Upsert Limit.

 

Here is the situtation. I have a dataset with records over 200. Is there a way to override the limit?

 

Here is the code so far:

 

while ($record_count == $number_records)  

{

  set_time_limit(20);

 {$data_set = mysql_query("SELECT * from table_name") or die (mysql_error());}

 $data_count=mysql_num_rows($data_set);   

 

 $all_fields = array();
  $i = 0;

while ($data_1 = mysql_fetch_assoc($data_set))
  {
     $all_fields[$i]['RecordTypeId']                    = $data_1['field1'];
     $all_fields[$i]['STB_Organization_ID__c']          = $data_1['field2'];
     $all_fields[$i]['Branch_Site_ID__c']               = $data_1['field3'];
    
     $i++;
   }

 

 $record_count = $i;
  $sObjects = array();

   foreach ($all_fields as $fieldset)
   {
     $sObject = new sObject();
     $sObject->type = 'Account'; // Salesforce Table or object that you will perform the upsert on
     $sObject->fields = $fieldset;
     array_push($sObjects, $sObject);
   }
 
   
   $success = upsert_accounts($client, $sObjects, $file_updated, $file_created, $file_failed);

    if (is_array($success))
    {
    
      $accounts_created = $accounts_created + $success[0];
      $accounts_updated = $accounts_updated + $success[1];
      $accounts_failed =  $accounts_failed + $success[2];
      
    }

 

    $starting_record = $starting_record + $number_records;
    
    ob_start();    
    $total_record_count = $total_record_count + $record_count;
    echo $total_record_count." records processed.<br />";
    ob_end_flush();

 

 

}