cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori CAP Freestyle Uncaught Type Error oCreateModel.create is not a function

glauco
Active Contributor
0 Kudos

Hi.

Error: Uncaught Type Error oCreateModel.create is not a function

It is a local test wirh cds run.

I developed the CAP course already and works well.

But I found out there is not a create function on mitigations app.

So to practice, I've created a new app inside Risk service, named Products.

I created Products table in schema.cds.

I created products new app. I created worklist view and create view.
I created SAVE button, in Create view, to call onSave function.

I developed Create.controller.js and onSave function like attached images bellow.

schema

manifest

Create view

onSave function

View Entire Topic
glauco
Active Contributor
0 Kudos

I made some adjustments.
Now create is Executed.

But never return success nor error.

_onCreateMatched now executes.

create now executes, but never returns success or error.

junwu
Active Contributor
0 Kudos

anything at console?

glauco
Active Contributor
0 Kudos

this is what I have on terminal.

before creating, when I run the worklist.

I have this error on terminal, even before creating a new record.

glauco
Active Contributor
0 Kudos

And when clicking on creating (onSave), no more error messages.

Console.

glauco
Active Contributor
0 Kudos

But I found another error message here in local console log.
I'm going to test the quantity and price format.
I think it is going as string.