Ice.BO.CompanyDataSet.CompanyRow dows not contain a definition for 'AttachNetworkRoot'

Hello,

I’m working on converting some E10 customs to kinetic 2022.x… so far this is the only error left…

 'Ice.BO.CompanyDataSet.CompanyRow' does not contain a definition for 'AttachNetworkRoot' and no extension method 'AttachNetworkRoot' accepting a first argument of type 'Ice.BO.CompanyDataSet.CompanyRow' could be found (are you missing a using directive or an assembly reference?)

and this is the code:

#region DispatchAttachments

	private void attList() { 
		Cursor.Current = Cursors.WaitCursor;				
		DynamicQueryAdapter baqAdapter = new DynamicQueryAdapter(oTrans);
		CompanyAdapter comp = new CompanyAdapter(this.oTrans);
		comp.BOConnect();
		Ice.Core.Session epiSession = (Ice.Core.Session)ProjectEntryForm.Session;
		comp.GetByID(epiSession.CompanyID);
		***FPSpath = comp.CompanyData.Company[0].AttachNetworkRoot.ToString() + @"\";***
		comp.Dispose();
		baqAdapter.BOConnect();
		string company = epiSession.CompanyID;
		//string BAQID = company + "-DispatchAttachment";
		QueryExecutionDataSet dsBaq = new QueryExecutionDataSet();
		if(_edvProject.Row < 0)
		{
			dsBaq.ExecutionParameter.AddExecutionParameterRow("ProjectID", "", "nvarchar", false, Guid.NewGuid(), "A");
		}
		if(_edvProject.Row > -1)
		{
			dsBaq.ExecutionParameter.AddExecutionParameterRow("ProjectID", Project_DataView[0]["ProjectID"].ToString(), "nvarchar", false, Guid.NewGuid(), "A");
		}
		baqAdapter.ExecuteByID(company + "-DispatchAttachment", dsBaq);
		
		EpiDataView edvProjects = new EpiDataView();

		edvProjects.dataView = new DataView(baqAdapter.QueryResults.Tables["Results"]);

		DataTable gridUD20 = baqAdapter.QueryResults.Tables["Results"];
		//Add adpater to tables 
		attGrid.DataSource = gridUD20;
		baqAdapter.Dispose();

		attGrid.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
		baqAdapter.Dispose();
		Cursor.Current = Cursors.Default;	

Any help will be very appreciated.

That field no longer exists. They changed the way they handle attachments.
Let me see if I can find you something.

I couldn’t find anything I thought would be helpful.

Maybe in the meantime describe what exactly you are doing so someone with knowledge
of the way it works now can chime in on some tips.

Base URL for storage isn’t in Company Maintenance anymore; they split it out.

You may be looking for this field: DocType.BaseURL.

Ice.BO.DocType.

What I’m willing to do is to create an email and attach to the emaill all the project attached files. Right now what I’ve done is to hardcode the network path, the very same in the Attachment type maintenance.

will take a look at the DocType, maybe the method I’m looking for is right there!!!

Thank you both of you.

2 Likes