Desperately Seeking Solution Save FeatureLayer

466
1
08-10-2021 09:08 AM
RobertBossio
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
RickeyFight
MVP Regular Contributor

@RobertBossio 

Will this work? 

https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/feature-class-to-feature-class.ht...

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

0 Kudos