I’m trying to create my first function and am receiving an error. I created 7 string request parameters to pass data in. I am attempting to take the data input and push it out to print some bartender labels. Any help is appreciated. The string data is using the parameters.
Error: Adding a relationship with an entity which is in the Deleted state is not allowed.
string location = @"\\XXXXXXXX\BarTender\Input\";
string pathString;
string fileName = "Ad Hoc" + DateTime.Now.Ticks.ToString() + ".txt";
string data = "adhoc," + lblQty + "," + l1L + "," + l1T + "," + l2L + "," + l2T + "," + l3L + "," + l3T;
pathString = location.ToString() + fileName.ToString();
using (System.IO.StreamWriter sw = System.IO.File.CreateText(pathString))
{
sw.WriteLine(data);
}