cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Service Layer: Select does not work as expected on UDOs

former_member547648
Participant
0 Kudos

Hi,


I have created an UDO named Poligono.

It is possible to create and retrieve values.

GET /Poligono

results in

{
    "odata.metadata": "https://<server>:50000/b1s/v1/$metadata#Poligono",
    "value": [
        {
            "Code": "1",
            "Name": null,
            "DocEntry": 1,
            "Canceled": "N",
            "Object": "Poligono",
            "LogInst": null,
            "UserSign": 1,
            "Transfered": "N",
            "CreateDate": "2018-12-27",
            "CreateTime": "11:54:00",
            "UpdateDate": null,
            "UpdateTime": null,
            "DataSource": "O",
            "U_Rubro": 1111,
            "U_Reparte": null
        }
    ]
}

But when I try to reduce the amount data returned by using a select that does not work as expected:

I execute the following:

GET /Poligono?$select=U_Rubro

That return the following:

{
    "odata.metadata": "https://<server>:50000/b1s/v1/$metadata#Poligono",
    "value": [
        {
            "Code": null,
            "Name": null,
            "DocEntry": null,
            "Canceled": "N",
            "Object": null,
            "LogInst": null,
            "UserSign": null,
            "Transfered": "N",
            "CreateDate": null,
            "CreateTime": null,
            "UpdateDate": null,
            "UpdateTime": null,
            "DataSource": null,
            "U_Rubro": 1111,
            "U_Reparte": null
        }
    ]
}

So it seems it still returns all attributes, but shows the most of them as null, independently of what value the have.

This behaviour differs from the behaviour when working with standart (i.e. non user defined) objects.

Is this behavior intentional or is it a bug?

Regards


Nils Stritzel

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi NILS STRITZEL,

You are having the same scenario as mentioned in SAP Note 2722485. The issue is supposed to be fixed in the upcoming patches.

Kindly keep checking the mentioned SAP Note about the fix.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)