Inside my CSOM code, I can populate a "People or Group" field using User object, as follow:-
var technician = context.Site.RootWeb.EnsureUser(SQLitem.Technician);
context.ExecuteQuery();
NewUFSlistItem["UserFeedbackEngineer"] = technician;
while if i try to populate a "Managed Metadata" field using Term object, it will fail where the field will not have any value:-
TermSet ts = g.TermSets.GetByName(termsetname);
var customername = ts.Terms.GetByName(SQLitem.Account);
NewUFSlistItem["UserFeedbackCompanyName"] = customername;
context.ExecuteQuery();
so can anyone advice? why my second code sample will not populate the "Managed Metadata" field?