cloud - Insert Sales Order by graph in Acumatica -


I'm trying to insert a sales order through the graph My code is working, but it is not included in the database It is my code. Create a sales order. I am using Acumatica 4.0

  Zero Zones (String Outlet CD, String SelmanCd) {Customer Seas = PX Selection and Customer; Where and lieutenant; Customer. ACTD, Equal and LT; Required and lt; Client.ACDD & gt; & Gt; & Gt; & Gt; . Select (this, outlet CD); Salesperson Salesman = PXSelect & lt; SalesPerson, where & lt; SalesPerson.salesPersonCD, similar & lt; Required & lt; SalesPerson.salesPersonCD & gt; & Gt; & Gt; & Gt; . Select (this, seller's CD); If (kus! = Null & amp; cus.BAccountID! = Null) {Soderter graph = pxgrf.ct instance & lieutenant; Sodarantra & gt; (); Soudar new order = graph Document insert (); NewOrder.OrderType = "SO"; NewOrder.OrderDate = DateTime.Now; NewOrder.RequestDate = DateTime.Now; NewOrder.CustomerID = cus.BAccountID; Graph.Document.Cache.RaiseFieldUpdated & lt; SOOrder.customerID & gt; (newOrder, null); NewOrder.SalesPersonID = smNPP.SalesPersonID; Graph.Document.Cache.RaiseFieldUpdated & lt; SOOrder.salesPersonID & gt; (newOrder, null); NewOrder.Status = "N"; Graph.Document.Current = newOrder; Graph.Document.Cache.Update (newOrder); Graph.Actions.PressSave (); }}   

Thank you for your help.

Try it out: Soderentry Graph = PXGraph.CreateInstance & lt ; SOOderEntry & gt; (); Süder new order = (Soder) graph. Document.chatch.crat instances (); // Simply fill the keys NewOrder.OrderType = "SO"; NewOrder = sograph.Document.Insert (newOrder); // Apply Automation Step NewOrder = PXCache & lt; SOOrder & gt; Kreatecopy (graph.Document.Search & lt; SOOrder.orderNbr> (newOrder.OrderNbr)); NewOrder.OrderDate = DateTime.Now; NewOrder.RequestDate = DateTime.Now; NewOrder.CustomerID = cus.BAccountID; NewOrder.SalesPersonID = smNPP.SalesPersonID; graph.Document.Update (newOrder); Graph.Actions.PressSave ();

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -