How would I go about updating user defined fields programmatically?
I can’t find any examples or any documentation on how to do this.
Found a post showing the below, but I need to update UDF fields on IN Issue, IN transfer and IN Receipts, and none of them has Answers view.
// iterate attributes on case to set values
var answers = caseGraph.Answers.Select();
using (var ts = new PXTransactionScope())
{
foreach (CSAnswers att in answers)
{
if (att.AttributeID == "MYATTRIB")
{
att.Value = "My attribute value";
}
}
caseGraph.Answers.Cache.Update(answers);
caseGraph.Task.Cache.Update(caseGraph.Case);
caseGraph.Actions.PressSave();
ts.Complete();
}