I am importing a large set of files from an existing document library and would like to upload the
file then assign and populate an existing metadata template named (Research). The file uploads to box fine but
I receive the following error when assigning the metadata template.
Box.V2.Exceptions.BoxException: '{"message":"Instance not found for '\"template\", \"scopedKey\", \"enterprise_xxxxx\", \"Research\"'","code":"instance_tuple_not_found","request_id":"***number removed for privacy***59xxxxxx"}'The file upload code seems to work fine.
using (FileStream stream = new FileStream(@row["FilePath"].ToString(), FileMode.Open))
{
BoxFileRequest req = new BoxFileRequest()
{
Name = "test12.doc",
Parent = new BoxRequestEntity() { Id = "3***phone number removed for privacy***" }
};
newFile = await userClient.FilesManager.UploadAsync(req, stream);
}
But I receive the error when I try to create the file metadata
var md = new Dictionary()
{
{ "Symbol", "ABC" }
};
Box.V2.Managers.BoxMetadataManager mm = userClient.MetadataManager;
var createMD = await mm.CreateFileMetadataAsync(newFile.Id.ToString(), md, "enterprise", "Research");

Thanks