Uncaught TypeError: C.createPostQuery is not a function

08-09-2021 11:32 AM
New Contributor II

I'm trying to save a layer created on client web application using JavaScript API 4.20 to the user's portal. I'm using portal.user.addItem function but get error, "Uncaught TypeError: C.createPostQuery is not a function". 

Any examples of saving a layer to user's portal using portal.user.addItem? I can successfully read user's layers from the portal, and save one back (changing some values to make it unique). Is the issue that the layer is created on the client (FeatureLayer) and then saved to the portal? Any way of doing this with the JavaScript API? 

Any info appreciated.

0 Kudos
0 Replies