使用Acumatica WebService导出FileAttachment

时间:2018-02-22 21:39:59

标签: acumatica

我正在尝试通过附加到活动的所有文件附件和注释来获取来自不同实例的案例的活动。我尝试过不同的方式,但不幸的是,没有一个方法有效。任何人都可以建议使用Acumatica WebService获取案例活动的所有文件附件和注释的最佳方法。

这是我试过的代码 -



SP203010WS.Content content = context.GetSchema();
export = context.Export
(
	new SP203010WS.Command[]
	{
		new SP203010WS.Value
		{
			LinkedCommand = content.Case.CaseID,
			Value = currentCaseNo
		},

		content.Activities.Type,
		content.Activities.Summary,
		new SP203010WS.Field { FieldName="Body", ObjectName="Activities"},
		content.Activities.StartDate,
		content.Activities.CreatedBy,
		new SP203010WS.Field { FieldName="NoteID", ObjectName="Activities"},
		content.Activities.CreatedAt,
		new SP203010WS.Field
		{
			FieldName = content.Activities.ServiceCommands.Attachment.FieldName,
			Value = content.Activities.ServiceCommands.Attachment.Value,
			LinkedCommand = content.Activities.ServiceCommands.Attachment
		},
		new SP203010WS.Attachment
		{
			FieldName = content.Activities.ServiceCommands.Attachment.FieldName,
			Value = content.Activities.ServiceCommands.Attachment.Value
		},
		new SP203010WS.Value
		{
			FieldName = content.Activities.ServiceCommands.Attachment.FieldName,
			Value = content.Activities.ServiceCommands.Attachment.Value,
			LinkedCommand = content.Activities.ServiceCommands.Attachment
		},
	},
	new SP203010WS.Filter[]
	{
		new SP203010WS.Filter
		{
			Field = content.Activities.StartDate,
			Condition = SP203010WS.FilterCondition.Greater,
			Value = maxStartDate
		}
	},
	0, true, true
);




1 个答案:

答案 0 :(得分:0)

查看I200(基于屏幕的Web服务)第75-76页的文档。首先,您必须获取文件名列表,然后遍历每个文件名以获取实际附件。