I was told I would need "Basic" Runtime license level unless I used Esri named users. I am authenticating using Oauth2 and Esri named users, but when I try to run the code below, I get an error message,
"Attempt to use functionality that is not supported for the current license level".
My current license level is "Lite". Shouldn't I be able to sync with "Lite" using named users?
Thanks,
Matt
function executeSync(databasename,index) {
resultProgress.value = 0;
var content=layersModel.get(index);
var synctaskid=content.layerId+"_syncTaskId";
var x=content.layerUrl.substring(content.layerUrl.lastIndexOf("/"));
var featurelayerid=x.replace("/","");
var Urlsplitted=content.layerUrl.replace(content.layerUrl.substring(content.layerUrl.lastIndexOf("/")),"");
syncLayerOptions.layerId=featurelayerid;
var newObject1=ArcGISRuntimeEnvironment.createObject("Geodatabase", {id:"gdb",path:outputGdb+"/"+databasename,serviceUrl:Urlsplitted});
var newObject2=ArcGISRuntimeEnvironment.createObject("GeodatabaseSyncTask", {id:synctaskid,url:Urlsplitted});
syncJob =newObject2.syncGeodatabase(syncParameters, newObject1);
delay(1000, function() {
if (syncJob) {
syncWindow.open();
simpletimer.start();
resultProgress.value += 1.0;
syncJob.credential.token=app.portal.token;
syncJob.jobStatusChanged.connect(updateSyncJobStatus);
simpletimer.running=false;
simpletimer.stop();
syncJob.start();
} else {
syncWindow.open();
statusText = "Sync failed";
syncWindow.hideWindow(5000);
console.log("sync else");
}
});
}