none
EntityMembersGet using version flag.

    Frage

  • All,

    I am using WCF to get members of an entity from MDS using below code: -

    MemberIdentifier memberIdentifier = new MemberIdentifier();
    EntityMembersGetRequest getRequest = new EntityMembersGetRequest();
    getRequest.MembersGetCriteria = new EntityMembersGetCriteria();
    getRequest.MembersGetCriteria.ModelId = new Identifier { Name = modelName };
    getRequest.MembersGetCriteria.VersionId = new Identifier { Name = versionName };
    getRequest.MembersGetCriteria.EntityId = new Identifier { Name = entityName };
    getRequest.MembersGetCriteria.MemberType = memberType;
    getRequest.MembersGetCriteria.MemberReturnOption = MemberReturnOption.Data;
    getRequest.MembersGetCriteria.SearchTerm = "Code = '" + memberCode + "'";
    EntityMembersGetResponse getResponse = clientProxy.EntityMembersGet(getRequest);

    The results are as expected. Based on the above code, i am fetching data based on versionName (i.e, VERSION_1, VERSION_2 etc). But i would need to get the data using version flags. Hardcoding the versionNames as VERSION_1 would be a problem later on. VERSION_1 might not be the latest version always. Hence i would want to use the versionflags. Could somebody help me with the same?

    Freitag, 16. November 2012 14:31

Antworten

  • Hi Nagesh,

    This is not possible. You will need to manage the latest relevant version in your application by querying for it before doing the EntityMembersGet.

    Thanks,

    Tomer (MSFT).


    Freitag, 16. November 2012 18:03

Alle Antworten

  • Hi Nagesh,

    This is not possible. You will need to manage the latest relevant version in your application by querying for it before doing the EntityMembersGet.

    Thanks,

    Tomer (MSFT).


    Freitag, 16. November 2012 18:03
  • Thanks Tomer,

    Could you please share the code to get the latest version of a model if you have it handy?

    Regards,

    Nagesh CL

    Mittwoch, 21. November 2012 13:17