Skip to Content
Nov 29, 2017 at 01:55 PM

Function Import with $expand odata parameter : no conversion exit ?


Dear all,

I am facing what seems to be a standard issue related to conversion exits.

Here is what I have :

We can see 2 Entity types "Material" and "Units" Linked by a Navigation property. Nothing fancy here.

I also have a Function Import named "GetComponents" with the described input parameters. The return parameters is defined as below :

You can see it returns a "MaterialSet" entity set.

Here is my problem : when calling my Function Import i pass the "$expand" parameter in order to retrieve every alternative unit of the so called material :

But the results of the expanded entityset (UnitsSet) are not converted to external values (ST is still ST) :

The problem does not occur when I try to reach an entity/entity set with $expand parameter via the READ method :

Here is the converted output (ST => PCE, KAR => CAR) :

Debugging the standard, I can see that the conversion exit method is executed for the expanded entity sets only when it is a "read" operation. The Call Function of Function Import only applies conversion to the main entity/entity set returned by the function itself but not for the expanded entities...

Is there any solution ? Is this issue has been corrected in latest releases ?

Thank you for your time.




segw-1.png (30.5 kB)
segw-2.png (19.7 kB)
code-1.png (14.2 kB)
output-1.png (1.7 kB)
code-2.png (7.3 kB)
output-2.png (4.0 kB)