I have created code that will use the acumatica API to insert a case and then insert attributes into that case. (This functions properly)
Here is the insert of the Attribute to the case, it functions correctly:
// Add the attribute to the Case
CR306000 = context.CR306000GetSchema();
context.CR306000Clear();
CR306000Content[] resultAttributes = context.CR306000Submit(
new Command[] {
new Value { Value = sCaseID, LinkedCommand = CR306000.CaseSummary.CaseID, Commit = true },
new Value { Value = "Asset ID", LinkedCommand = CR306000.Attributes.Attribute },
new Value { Value = "X22345", LinkedCommand = CR306000.Attributes.Value, Commit = true },
CR306000.Actions.Save
}
);
When I get to inserting a related task, the task is not getting created. The error message I get is Error #98: View Activites doesn't exist.
Any suggestions on how to insert a related task to the case?
Here is the code that does not insert the task.
CR306010Content CR306020 = context.CR306010GetSchema();
context.CR306020Clear();
context.CR306020Submit(
new Command[]
{
new Value { Value = "New Task For CaseID=[" +sCaseID + "]", LinkedCommand = CR306020.Details.Summary, Commit=true },
new Value { Value = sCaseID, LinkedCommand = CR306020.Details.RelatedEntity },
new Value { Value = "000001", LinkedCommand = new Field { ObjectName = CR306020.Details.RelatedEntity.ObjectName, FieldName = "RefNoteID" } },
new Value { Value = "False", LinkedCommand = CR306020.Details.Billable },
new Value { Value = "Administrative", LinkedCommand = CR306020.Details.Workgroup },
new Value { Value = "EP00000002", LinkedCommand = CR306020.Details.Owner },
new Value { Value = "X", LinkedCommand = CR306020.Details.Project },
new Value { Value = "Task Description", LinkedCommand = CR306020.Details.Task},
new Value { Value = "Open", LinkedCommand = CR306020.Details.Status, Commit = true },
CR306020.Actions.SaveClose
}
);