Can you please provide us with step by step description on how do you add this parameter, do you add it in a basic template or into your custom template, which object is a macro source for this template, and please send us screenshots of the template and the resulted email.
To get the IMacrosInvokable interface, you have to add it first, by adding source code to the schema of your development package. Please, refer to the paragraph 'Creating the class which implements the IMacrosInvokable interface' of the guide.
Apart from that you can use your own templates that are quite convenient as well. More details are in this article:
If you receive the error 'IMacrosInvokable' could not be found' that means that most likely you are not using the Service application. This guide and functionality are developed for Service applications only and the interface IMacrosInvokable' is developed in CaseService package of the IMacrosInvokable schema. It might me the reason for this error. Our R&D team is working on implementation of this functionality in different products, so you may expect it in the upcoming versions of the application.
I am trying to filter product in opportunity based on location and sum the total for that location, then display it in printable template. Here is my code but its giving me three rows instead of just one. Please help
namespace Terrasoft.Configuration
{
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using Terrasoft.Common;
using Terrasoft.Core;
using Terrasoft.Core.DB;
using Terrasoft.Core.Entities;
using Terrasoft.Core.Packages;
using Terrasoft.Core.Factories;
[ExpressionConverterAttribute("AtsGetLocationProductsSum")]
class OpportunityProductSumByLocation : IExpressionConverter
{
private UserConnection _userConnection;
Hi! It is impossible for listed C# code to return more than 1 result, at least because you explicitly specified ToString in getLocationProductsSum. You can ensure that only one row is returned using esq.RowCount = 1. Probably, the reason behind such an output is that your function Evaluate is called three times. You can debug your piece of code using VisualStudio: https://msdn.microsoft.com/en-us/library/sc65sadd.aspx/
The code is suppose to group by locationId and sum the colums. Also, i didn't call the Evaluate function three times. Could it be because the location Id is in a table template. Please, could you explain how i can filter based on opportunity and location Id from the code i posted, maybe that will solve the problem.