Skip to Content

Property Invalid Error on model.create()

Jan 17, 2017 at 07:32 AM


avatar image
Former Member

I'm using ES4 as my backend. I have a create method for creating Business Partners. I'm doing this via oModel.create(). But whenever I try to create a new entry, I'm getting an error.

I'm guessing it has something to do with the complex type of Address.

Here is my method

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

VIPLOVE KHUSHALANI Jan 17, 2017 at 07:52 AM

Hi Melanie,

Check the gateway logs for more details , might be you are not sending the correct address. SAP might be checking the validity of postal code with city and country ... or any other check related to address.



Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Viplove,

Tried it using a valid address (copied some from the existing data from the odata service) but still having an error. Also I can do create using .submitChanges(). This was how the template in SAP WEDIDE implemented the create method. I'm trying to recreate the same functionality but with .create(). I tried type : '/IWBEP/GWSAMPLE_BASIC.CT_Address' since this was the complex type of "Address" on the payload. Maybe I'm pushing the data on itemData incorrectly.

Krishna Kishor Kammaje
Jan 18, 2017 at 04:02 AM

'Address' is a complex type. Complex types cannot be arrays. You are assigning an array to a complex type.

So below should work.

itemData = {

'City' : 'City1',

'PostalCode': 'PostalCode1',



10 |10000 characters needed characters left characters exceeded