title: Creating Order not setting CustomerID in Inserted Record
body: <p>I'm not sure why this is being difficult, but I can't seem to insert a new SOOrder with a customer ID in the SOOrder page. I'm trying to do this programmatically creating a new instance of SOOrder and using that to insert and save the new order.</p>
  
  <p>If I insert a fresh SOOrder object into the (Current)Document view, then set the customer ID, run an update, and try to save, I get the error that CustomerID cannot be null. Looking into the object during runtime after the update is executed, it shows the Inserted row with a CustomerID of null:</p>
  
  <pre><code>...
  SOOrder order = new SOOrder();
  SOOrderEntry graph = PXGraph.CreateInstance&lt;SOOrderEntry&gt;();
  order.OrderType = "SO";
  graph.CurrentDocument.Insert(order);                
  order.CustomerID = project.CustomerID;
  graph.CurrentDocument.Update(order);
  graph.Actions.PressSave();
  ...
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0gXZB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0gXZB.png" alt="enter image description here"></a></p>
  
  <p>If I try to first set the CustomerID in an SOOrder object, then insert that object into the (Current)Document view, it gives me a more complex error in relation to the customer ID:</p>
  
  <pre><code>...
  SOOrder order = new SOOrder();
  SOOrderEntry graph = PXGraph.CreateInstance&lt;SOOrderEntry&gt;();
  order.OrderType = "SO";     
  order.CustomerID = project.CustomerID;
  graph.CurrentDocument.Insert(order);
  ...
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lOPP2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lOPP2.png" alt="enter image description here"></a></p>
  
  <p>Is there something special I need to do to get a CustomerID to get set within the view object so I can save it?</p>