Finding Service Name with Trace

Good afternoon,
To preface, I am very new to Kinetic and have taken the classes Epicor provided with consultants.

I am trying to find out what a contractor did on our system and I was able to find the code, I understand all of it, but if I wanted to replicate this functionality for another table, how would I find the equivalent of ERP.Contracts.VendorSvcContract for the Customer table? What is this string called? It would be easier to try to find it if I knew it’s proper name. I have put the code below with comments from Github copilot

Thanks!

// Update Vendor's NDA Fields

// Get the first record from ttXFileRef
var ttRow = ttXFileRef.FirstOrDefault();

// Query the XFileAttch table for a record where RelatedToFile is "Vendor", and Company and XFileRefNum match the values from ttRow
var XFileAttach = (from x in Db.XFileAttch 
                   where x.RelatedToFile == "Vendor" && 
                         x.Company == ttRow.Company && 
                         x.XFileRefNum == ttRow.XFileRefNum 
                   select x).FirstOrDefault();

// If a record is found, convert the Key1 field to an integer and assign it to vNum
if (XFileAttach != null)
{
  vNum = Convert.ToInt32(XFileAttach.Key1.ToString());
}

// Get a service instance of VendorSvcContract
Erp.Contracts.VendorSvcContract vendAdp = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.VendorSvcContract>(Db);

// Retrieve a vendor record by the ID stored in vNum
Erp.Tablesets.VendorTableset vendds = vendAdp.GetByID(vNum);

// Depending on the DocTypeID of ttRow, update different fields in the vendor record
if (ttRow.DocTypeID == "NDA")
{
  vendds.Vendor[0]["NDAAttached_c"] = true;
  vendds.Vendor[0]["NDADate_c"] = DateTime.Now;
  vendds.Vendor[0]["NDADue_c"] = DateTime.Now.AddYears(5);
}
else if (ttRow.DocTypeID == "CRT")
{
  vendds.Vendor[0]["ISOCRTAttached_c"] = true;
  vendds.Vendor[0]["ISODate_c"] = DateTime.Now;
}
else if (ttRow.DocTypeID == "EXR")
{
  vendds.Vendor[0]["EXPAttached_c"] = true;
}

// Mark the vendor record as updated
vendds.Vendor[0].RowMod = "U";

// Send the updated vendor record back to the database
vendAdp.Update(ref vendds);

// Clean up by setting vendds and vendAdp to null and disposing of the vendAdp service instance
vendds = null;
vendAdp.Dispose();
vendAdp = null;

There is an immensely helpful tool in the help menu called field help. It shows the field name, table name, and some description information along with help file information about the field you are clicking on. Of course, you have to find the field in a native form in Epicor in order to use this trick. If you don’t even know where to begin this can be a tricky request. The easiest thing for me is to open the BAQ editor and start poking around in the tables. The BAQ editor show slots of great table and field level information.

This code looks like it might be a directive oof some sort. Check out “Method Directives” and “Data Directives” to see if this code is present in either. If so, you can use that directive as a template for how to setup a different table.

To start with try to find out where that code lives in your system. If not in a directive, then in a function of BPM.

This code is a part of a data directive. It is calling that Service Erp.Contracts.VendorSvcContract and assigning it to vendAdp. Field level help doesn’t help me here because it just checks a box to acknowledge that an EXR doc type is attached. Part of me just wants to try Erp.Contracts.CustomerSvcContract and see if it works, but I’d like some assurance that the whatever it is actually exists.

Does that make sense?

I have tried using the debugger in Edge but it doesn’t return what I expect, it returns a method NewCustomerAttch

This post seems to suggest that service exists:
Trying to update Customer from CustCnt.Update post-processing BPM - ERP 10 - Epicor User Help Forum (epiusers.help)