I have following snippet to get the attached document of notes of an Order. Now, I want to attach this document in a email using plugin. Any idea/suggestion to attach this document to email attachment.
EntityCollection results = null;
QueryExpression query = new QueryExpression
{
EntityName = "annotation",
ColumnSet = new ColumnSet("subject", "filename", "notetext", "documentbody"),
Criteria = new FilterExpression
{
Conditions = {
new ConditionExpression {
AttributeName ="objectid",
Operator = ConditionOperator.Equal,
Values = { order }
},
new ConditionExpression {
AttributeName = "isdocument",
Operator = ConditionOperator.Equal,
Values = { true}
}
}
}
};
results = service.RetrieveMultiple(query);
*This post is locked for comments
I have the same question (0)