Create Order With Multiple Templates
Posted: Thu Jul 01, 2021 3:45 pm
I have code that applies a template when creating an order in the API. Is it possible to add multiple templates to be applied to the order when created. I need to apply a default template to each order besides the unique one that gets picked when my users select a certain order type.
Code: Select all
if (oTemplate.SpstTempateDescription == "N/A")
{
specTemplate.Templates.Add("CTWI TO REFI");
}
else
{
switch (Convert.ToInt32(dt.Rows[i].ItemArray[62]))
{
case vCDF:
specTemplate.Templates.Add(oTemplate.SpstTempateDescription.Trim() + " CDF");
blnCDF = true;
break;
default:
specTemplate.Templates.Add(oTemplate.SpstTempateDescription);
blnCDF = false;
break;
}
}
specTemplate.Templates.Add("Default Template");