locked
MDS- the supplied version is not valid RRS feed

  • Question

  • I've got this error while trying to validate my entity member.

     

    ValidationProcessCriteria criteria = new ValidationProcessCriteria();
                ValidationProcessResult result = new ValidationProcessResult();
                ValidationProcessOptions options = new ValidationProcessOptions();
                ValidationIssue[] issueList;
                Collection<MemberIdentifier> identifiers = new Collection<MemberIdentifier>();
    
                options.CommitVersion = true;
                options.ReturnValidationResults = true;
    
                criteria.EntityId = new Identifier { InternalId = internalEntityId };
                criteria.ModelId = new Identifier { InternalId = internalModelId };
                criteria.VersionId = new Identifier { InternalId = internalVersionId };
    
                foreach(Member member in entityMembers.Members)
                {
                    identifiers.Add(new MemberIdentifier() 
                    { 
                        Code = member.MemberId.Code, 
                        Name  = member.MemberId.Name
                    });
                }
    
                criteria.Members = identifiers.ToArray();
    
                return operationResult = service.ValidationProcess(international, criteria, options, out issueList, out result);
    

    How to solve this problem.

     

    Monday, January 2, 2012 11:21 AM

Answers

  • I've solved this problem, the goal was to change this part of code

     criteria.EntityId = new Identifier { InternalId = internalEntityId };
                criteria.ModelId = new Identifier { InternalId = internalModelId };
                criteria.VersionId = new Identifier { InternalId = internalVersionId };
    


    to 

     criteria.EntityId = new Identifier { Name = "YourName" };
                criteria.ModelId = new Identifier { Name = "YourName" };
                criteria.VersionId = new Identifier { Name = "YourName" };
    

    I thought that passing the internalId will also works.

    • Proposed as answer by AnupKumar Monday, January 2, 2012 7:43 PM
    • Marked as answer by Challen Fu Tuesday, January 3, 2012 9:37 AM
    Monday, January 2, 2012 1:43 PM

All replies

  • I've solved this problem, the goal was to change this part of code

     criteria.EntityId = new Identifier { InternalId = internalEntityId };
                criteria.ModelId = new Identifier { InternalId = internalModelId };
                criteria.VersionId = new Identifier { InternalId = internalVersionId };
    


    to 

     criteria.EntityId = new Identifier { Name = "YourName" };
                criteria.ModelId = new Identifier { Name = "YourName" };
                criteria.VersionId = new Identifier { Name = "YourName" };
    

    I thought that passing the internalId will also works.

    • Proposed as answer by AnupKumar Monday, January 2, 2012 7:43 PM
    • Marked as answer by Challen Fu Tuesday, January 3, 2012 9:37 AM
    Monday, January 2, 2012 1:43 PM
  • Great! Thanks for sharing the information.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 3, 2012 9:37 AM