How update metadata of a Class

Hello,

A question please....

If we want to update a property of a document like this.. it's ok... the update text of the property is done..

var objID = new MFilesAPI.ObjID();
objID.SetIDs(
    ObjType: (int)MFBuiltInObjectType.MFBuiltInObjectTypeDocument,
    ID: 5);

// Check out the object.
var checkedOutObjectVersion = vault.ObjectOperations.CheckOut(objID);

BUT... which value have we to put for a class ??...

i have try to put the ID of the class... tu put 1.. but seems to have an issue during the checkout...( the code exit the void without exception)

any help is possible by Mfiles team??

Parents
  • it's Ok, i have found....

    foreach (ObjectVersion ov in searchResults)
    {
    ObjVer oVer = ov.ObjVer;
    int ID = oVer.ID;
    int typeobj = oVer.Type;

    during the loop of search result.. by taking the ObjVer and next the typeObj....it's possible tu update the property of the class...

    and so afte.. the chekc out is ok.. and the update Property donne.

     var objID = new MFilesAPI.ObjID();
     objID.SetIDs(
         ObjType: typeobj,
         ID: idobj);

Reply
  • it's Ok, i have found....

    foreach (ObjectVersion ov in searchResults)
    {
    ObjVer oVer = ov.ObjVer;
    int ID = oVer.ID;
    int typeobj = oVer.Type;

    during the loop of search result.. by taking the ObjVer and next the typeObj....it's possible tu update the property of the class...

    and so afte.. the chekc out is ok.. and the update Property donne.

     var objID = new MFilesAPI.ObjID();
     objID.SetIDs(
         ObjType: typeobj,
         ID: idobj);

Children
No Data