Trying to Create First Function

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)) 

You must have deleted a function with the same name as what you are trying to create. It doesn’t save between so if you change the name of the function you are creating right now it will likely save.

1 Like

Thank you @jgiese.wci !!!