// Insert a new customer record Customer customer = new Customer(); customer.CustomerID = "TESTCUST"; customer.CompanyName = "Test Customer Company"; customer.Status = "A"; customer = PXCache.Insert(customer);
// Insert a new note record for a sales order Note note = new Note(); note.NoteID = Guid.NewGuid(); note.EntityType = typeof(SOOrder).FullName; note.EntityID = order.OrderNbr; note.NoteText = "This is a test note."; note = Base.Document.Cache.Insert(note);In this example, the Insert method is used to insert a new note record associated with a sales order. The Note object is instantiated and the relevant properties are set. The Insert method is called on the cache for the current document (Base.Document.Cache). This will add the new note record to the cache, but does not yet persist the record to the database. Package library: Acumatica ERP.