Skip to Content
1
Jun 20, 2018 at 09:13 PM

How to create EmployeesInfo with EmployeeBranchAssignment for SBO/HANA using ServiceLayer (Bug?)

154 Views Last edit Jun 21, 2018 at 09:59 AM 2 rev

Hi,

Using the ServiceLayer I want to create an EmployeesInfo that contains an

EmployeeBranchAssignment. I want to receive the following result:

{
    "EmployeeID": 7,
    "LastName": "Bond",
    "FirstName": "James",
    "Active":"tYES",
    ... left out some lines
    "EmployeeBranchAssignment": [
    {
        "EmployeeID": 7,
            "BPLID": 6
        }
    ]
}

First I tried the following to create it:

{
    "FirstName":"James",
    "LastName":"Bond",
    "Active":"tYES",
    ... left out some lines
    "BPLID":6
}

But this simply throws away the BPLID and returns:

{
    "EmployeeID": 7,
    "FirstName":"James",
    "LastName":"Bond",
    "Active":"tYES",
    "BPLID": null,
    ... left out some lines
    "EmployeeBranchAssignment": []
}

then I tried:

{
    "FirstName":"James",
    "LastName":"Bond",
    "Active":"tYES",
    ... left out some lines
    "EmployeeBranchAssignment":[
        "BPLID":6
    ]
}

and

    "FirstName":"James",
    "LastName":"Bond",
    "Active":"tYES",
    ... left out some lines
    "BPLID":6
    "EmployeeBranchAssignment":[
        "BPLID":6
    ]
}

but both gave me a "BadFormat" error.

I have used JournalEntry and JournalEntryLines before, therefore I expected this to work in a similar fashion. How do I set this during the creating of the record? Or is this a 2 step process? And if yes, how do I need to do that? Or is it a bug?

This is SBO 9.3 PL04

Thank you!