Desperately Seeking Solution Save FeatureLayer

08-10-2021 09:08 AM
New Contributor II

Using JavaScript API 4.20, I create FeatureLayers in my web application. I just need to save a layer back to my portal. I've tried everything I can think of unsuccessfully. I know it can be done, at least I can read layers from my portal and save them back to my portal (with minor modifications). But, I need to save FeatureLayer created within my web application. Is there any way to convert a FeatureLayer to a PortalItem layer that can be saved via user.addItem? Is there any other strategy to accomplish this? Any information would greatly be appreciated.

0 Kudos
1 Reply
MVP Regular Contributor


Will this work?

This is how I download data that is hosted on agol or portal. 

0 Kudos