1
0
-1

1 answer

  1.  
    2
    1
    0

    As of Maestro 5.0.12

    If you return a promise in the pre submit rule and resolve it on the success of the dynamic data call. It will submit otherwise not. Also if you return false it will not submit.

    var deferred = $q.deferred();
    var params = {
      name: "David"
    };
    DynamicData.call("Dummy Service", params).then(function(response){
        if (response.success) {
    		deferred.resolve();
    	} 
    }) 
     
    return deferred.promise;
    
    
    

     

    For older versions of Maestro see below:

    Use the DynamicData.call method in the click script of the submit button. On the success of this call. Submit the Form.

     

    var params = {
      name: "David"
    }
    DynamicData.call("Dummy Service", params).then(function(){
     Form.submit(item.properties.submissionMethod,item.properties.legacyMethod).then(function(response){
        Form.fireRule("onSuccess", item, data, response);
    }, function(err) {
        Form.fireRule("onFailure", item, data, err);
    });
    }) 

     

     

      CommentAdd your comment...