on 11-27-2018 12:14 PM
When using the sapsf odata API I can update and replace existing email address on the PerEmail entity with upsert and purgeType=full. I can also remove one of two address.
But I can't find any documentation of how to remove ALL (or the last one) email addresses for a person. I've tried with the delete command and also tried with upsert and purge and setting the email address to null, but nothing works.
So... How do I make a REST odata call to actually remove all email addresses for a person?
Hi,
the only released way of deleting emails is the "operation" field in the upsert operation of OData (all other approaches are either deprecated (SOAP) or for internal use only (CompoundDelete in OData)) This is a payload to delete the last email record of employee 103223 with EmailType 8448
POST <your API URL>/odata/v2/upsert
Authorization : Basic <your base64 encode of "Basic: apiuser@company:password">
Content-Type : application/json
{ "__metadata": { "uri": "https://apisalesdemo4.successfactors.com:443/odata/v2/PerEmail(emailType='8448',personIdExternal='103223')", "type": "SFOData.PerEmail" }, "emailType": "8448", "personIdExternal": "103223", "operation": "DELIMIT" }
See also Import Help for supported further entities.
Best regards
Gerald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, the fact that this also works for the API and not only for files is not clearly documented in SAP's documentation. That this works using the API instead only with file import is a life saver. Just wondering what other "hidden gems" exist in the API.
Thanks,
Marc
Only these activities are supported as you listed, i didnt see DELETE.
You can always check in Data dictionary or in the ODATA API reference library.
Full Purge - Existing record is deleted when the upsert operation is performed. A new record is created with the data specified through a URL parameter.
Incremental Purge - Only records specified in the payload is purged and replaced. All other records remain untouched. The data is specified through a URL parameter.
Here's the KBA Reference:
2670250 - OData Operations and Purge Types For Inbound Integrations
https://launchpad.support.sap.com/#/notes/2670250
However you can use this
https://launchpad.support.sap.com/#/notes/2375294
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.