on 12-18-2017 9:07 PM
Hey All,
I am trying to connect to the Successfactors system to retrieve email Information. Specifically - email address and email type.
I am selecting a couple of fields in PerPerson entity and then navigating to PerEmail.
emailNav/emailTypeNav
Now to get the Email type, I need to navigate to the picklist - ecEmailType, then to picklistLabels and select label. This field has the value 'business' or 'personal'. This is the value I need. The emailType field in PerEmail entity has the value 'B'. This is not something I can work with.
When I select label from picklistLabels, it gives me 3 records. For example:
"optionId": "17757",
"locale": "en_DEBUG",
"id": "44230",
"label": "Business",
"picklistOption": { "__deferred": { "uri": ................................................
"optionId": "17757",
"locale": "en_US",
"id": "44229",
"label": "Business",
"picklistOption": { "__deferred": { "uri": ................................................
"optionId": "17757",
"locale": "fr_CA",
"id": "44231",
"label": "Business",
"picklistOption": { "__deferred": { "uri": .......................................................
In the odata call I am using the filter:
&$filter=emailNav/emailTypeNav/picklistLabels/locale ne 'en_US'
to filter out only the english values. But it still retrieves all three records for the label.
Full odata call:
https://api4preview.sapsf.com/odata/v2/PerPerson?$select=customString3,personIdExternal,emailNav/ema... eq 'en_US'&$format=json
Note: I am trying these in Postman and they dont work
Are you using OData V4? If not I don't think filter properties on child entities is supported while triggering with an expand call on parent.
Secondly put an external breakpoint and debug what values are coming to the CL_HTTP_EXT_BASE_HANDLER->IF_HTTP_EXTENSION~HANDLE_REQUEST
or FM /IWBEP/FM_MGW_HANDLE_REQUEST
* Also your URL mentions ne and eq at different places, do check that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kriba,
I dont see any problem with your query and you are using correct OData version but as per my understanding Filter works with only fields at first level, that's the reason you are getting all the records.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.