Hi,
I have a strange problem. We are moving all the services located on our local arcgis server to arcgis online. I'm trying to update an in-house form application that uses these services. When I publish the same data to arcgis online, the find.find comes back with an error shown in the attached RejectedPromise.png image.
// The find() performs a LIKE SQL query based on the provided text value
// showResults() is called once the promise returned here resolves
find.find(findUrl, params).then(showResults).catch(rejectedPromise);
The app was running in 4.7 for several years, until we started moving to agol. When I called tech support this morning, they told me to update it to 4.28 and see what happens. Anyway, i took their find sample on the sdk site: Developers Find Sample
I edited it to use local services and hosted services by commenting out a line.
// Create a URL pointing to a map service
const findUrl = "https://services1.arcgis.com/*********/arcgis/rest/services/Partest/FeatureServer";
//const findUrl = "https://***********/rest/services/RealEstate/Parcels/MapServer";
// Set parameters to only query the Counties layer by name
const params = new FindParameters({
layerIds: [0],
searchFields: ["PARCELID"]
});
The exact same data in a local service works while the hosted service bombs. I tried it with other services we are moving like addresses and it's the same thing. I even modified the find example to work with our garbage collection hosted service that has always been hosted published right from Pro and it's the same thing.
The only difference is the type of service, Feature Server or Map Server. Their find example uses a Map Service.
I will call support tomorrow and show them the testing app I made and see what happens. Does anyone have any information that might help me find a resolution.
Thanks in advance,
Michael
Solved! Go to Solution.
FeatureServer services don't have a /find endpoint.
https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
find works for MapServer endpoints
FeatureServer services don't have a /find endpoint.
https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
find works for MapServer endpoints