public function MappedObject::pushDelete in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::pushDelete()
- 5.0.x modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::pushDelete()
Delete the mapped SF object in Salesforce.
Return value
$this
Overrides MappedObjectInterface::pushDelete
File
- modules/
salesforce_mapping/ src/ Entity/ MappedObject.php, line 462
Class
- MappedObject
- Defines a Salesforce Mapped Object entity class.
Namespace
Drupal\salesforce_mapping\EntityCode
public function pushDelete() {
$mapping = $this
->getMapping();
$this
->client()
->objectDelete($mapping
->getSalesforceObjectType(), $this
->sfid());
$this
->setNewRevision(TRUE);
$this
->set('last_sync_action', 'push_delete')
->set('last_sync_status', TRUE)
->save();
return $this;
}