2012-03-28 31 views
0

我在我的IOS-iPad項目之一中使用Salesforce CRM,我們正在嘗試將數據添加回Salesforce。有人可以告訴我這是如何實現的嗎?我們如何在iOS中將數據上傳到Saleforce?

我們使用SOAP API和SudzC.com庫。以下是示例請求片段。 我們如何生成externalIDFieldName?

<soapenv:Body> 
    <urn:upsert> 
     <!--Custom Field defined in Setup as the External ID--> 
     <urn:externalIDFieldName> 
       <b>External_Id__c</b> 
      </urn:externalIDFieldName> 
     <urn:sObjects xsi:type="Account"> <!--Zero or more repetitions:--> 
       <b><!--Existing Id, this record will be updated--></b> 
       <External_Id__c><b>ars1</b></External_Id__c> 
       <Name><b>Acme Rocket Superstore</b></Name> 
       <b><!--You may enter ANY elements at this point--></b> 
       <NumberOfEmployees><b>340</b></NumberOfEmployees> 
     </urn:sObjects> 
     <urn:sObjects xsi:type="Account"> 
       <b><!--New External Id, this record will be created (ensure required fields are present)--></b> 
       <External_Id__c><b>ams1</b></External_Id__c> 
       <Name><b>Acme Medical Supplies</b></Name> 
       <NumberOfEmployees><b>17</b></NumberOfEmployees> 
     </urn:sObjects> 
    </urn:upsert> 
</soapenv:Body> 

回答

0

通過查看字段名稱:External_Id__c你可以說這是一個自定義字段(__c結束)的帳戶對象是特定於Salesforce org的你與互動。據推測,它應該代表來自外部系統的ID,但我無法告訴你是否有人在你的應用中創建了一個字段供你使用,或者它應該是來自其他數據庫的ID。

您需要與在Salesforce方面工作的工程師交談,以瞭解其目的是什麼,如果它適合您,那麼我會建議將當前日期,時間和另一條信息組合起來以生成一些內容獨特。

+0

Thanks LaceySnr ...我能夠破解它......但現在我得到錯誤:「必須發送一個具體的實體類型」,任何想法regrading? – Deepthi 2012-03-30 08:15:38

0

upsert是更新/插入命令。根據數據(嘗試傳遞表名和ID)發送,它將更新或插入記錄到雲中。

相關問題