Unanswered MDS 2008R2 Validation API

  • Friday, September 28, 2012 7:00 AM
     
      Has Code

    Hi all!

    I need to copy version by programm. So I need to validate and commit version. Here is my code:

    private void button1_Click(object sender, EventArgs e)
    {
                ServiceClient client = new ServiceReference1.ServiceClient();
                ValidationProcessOptions vpo = new ValidationProcessOptions();
                vpo.CommitVersion = true;
                vpo.ReturnValidationResults = true;
                ValidationIssue[] validationIssueList;
                ValidationProcessResult validationProcessResult;
    
                ValidationProcessCriteria vpc = new ValidationProcessCriteria();
                vpc.ModelId = new Identifier() { Name = "ForTest" };
                vpc.VersionId = new Identifier() { Name = "222" };
    
                OperationResult result = client.ValidationProcess(new International(), vpc, vpo, out validationIssueList, out validationProcessResult);
    }

    But I have error: "You must specify entity members to request validation data." How can I validate version entirely?

All Replies

  • Friday, September 28, 2012 7:09 PM
    Moderator
     
     

    Hi _GTS_

    Can you try removing vpo.ReturnValidationResults = true;

    or making it false. I don't think you can request this flag when validating the entire model.

    Thanks,

    Tomer (MSFT).

  • Saturday, September 29, 2012 12:23 PM
     
     

    Hi _GTS_

    Can you try removing vpo.ReturnValidationResults = true;

    or making it false. I don't think you can request this flag when validating the entire model.

    Thanks,

    Tomer (MSFT).

    I tried to mark it false, but result of validation was wrong.