Class: DocumentTypeObject

DocumentTypeObject(properties)

new DocumentTypeObject(properties)

Parameters:
Name Type Description
properties Object the properties of the document type object

Methods

delete(successCallback, errorCallback)

this method is used to delete the document type from document type array
Parameters:
Name Type Description
successCallback function Default Success Call back function name
errorCallback function Default Error call back function name
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions successCallback - KMC_SUCCESS success call back jsonArray of page ids. errorCallback - error message would contain the appropriate error description.Possible error objects are Exception,KmcException,JSONException.
Example
var createdDocument = null;
var captureServer = null;
var documentTypesArray = null;
kfxCordova.kfxLibLogistics.createCaptureServer(function(captureServerObj){
     captureServer = captureServerObj;
},function(error){
     alert(JSON.stringify(error));
},{serverUrl:"valid url",serverType:"SERVER_KFS"});

captureServer.registerDevice(function(success){
     captureServer.loginAnonymously(function(success){
         documentTypesArray = success;
     },function(registerError){
         alert(JSON.stringify(registerError));
     });
},function(registerError){
     alert(JSON.stringify(registerError));
});
var documentType = documentTypesArray[0];
var kfsdocumentTypeReadyCallback = function(documentType){
  documentType.delete(function(success){
      alert(JSON.stringify(success));
  },function(error){
      alert(JSON.stringify(error));
  });
};

getProperties(successCallback, errorCallback)

this method is used to get the properties of the document type
Parameters:
Name Type Description
successCallback function Default Success Call back function name
errorCallback function Default Error call back function name
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions successCallback - KMC_SUCCESS success call back jsonArray of page ids. errorCallback - error message would contain the appropriate error description.Possible error objects are Exception,KmcException,JSONException.
Example
var createdDocument = null;
var captureServer = null;
var documentTypesArray = null;
kfxCordova.kfxLibLogistics.createCaptureServer(function(captureServerObj){
     captureServer = captureServerObj;
},function(error){
     alert(JSON.stringify(error));
},{serverUrl:"valid url",serverType:"SERVER_KFS"});

captureServer.registerDevice(function(success){
     captureServer.loginAnonymously(function(success){
         documentTypesArray = success;
     },function(registerError){
         alert(JSON.stringify(registerError));
     });
},function(registerError){
     alert(JSON.stringify(registerError));
});
var documentType = documentTypesArray[0];
var kfsdocumentTypeReadyCallback = function(documentType){
  documentType.getProperties(function(success){
      alert(JSON.stringify(success));
  },function(error){
      alert(JSON.stringify(error));
  });
};