I tried to insert data to salesforce but it returns
Required fields are missing: [TopicId]
Here is my code in inserting the data:
$tObject = new Stdclass();
$tObject->EntityId = 'Account salesforce id';
$Object->TopicId = 'Topic salesforce id';
$createResponse = $this->conn->create(array($tObject), 'TopicAssignment');
var_dump($createResponse);
And in my .xml file:
<complexType name="TopicAssignment">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Entity" nillable="true" minOccurs="0" type="ens:sObject"/>
<element name="EntityId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="EntityKeyPrefix" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="EntityType" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
<element name="NetworkId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Topic" nillable="true" minOccurs="0" type="ens:Topic"/>
<element name="TopicId" nillable="true" minOccurs="0" type="tns:ID"/>
</sequence>
</extension>
</complexContent>
</complexType>
Why does it return this error?
topicId
on$Object
instead of on$tObject
would explain your issue.