ArcGIS API for JavaScript: GCGIS_Export (FeatureServer)

Built using the ArcGIS API for JavaScript