9.01.12 on premise. I'm seeing something very strange with a form I'm working on. Given how this form is operating, I'm having a user populate fields & then creating a new entry & manually copying the data into the new record (Yes; I know.... sometimes the straightest path is through the mud and I *just* want this project over with. I digress.).
I have a bunch of mandatory fields (NOT NULL) and some optional. One of the required fields is a Location (NOT NULL and type LocType in SQL). In my Form Script, I have a section like this:
ThisForm.PrimaryIDOCollection.CurrentItem["DeliverTo"].SetValue( ThisForm.Components["editQMDeliverTo"].GetValueOfString(null) );
ThisForm.PrimaryIDOCollection.CurrentItem["DeliveryType"].SetValue( ThisForm.Components["dropListQMDeliveryType"].GetValueOfString(null) );
ThisForm.PrimaryIDOCollection.CurrentItem["Item"].SetValue( ThisForm.Components["comboBoxQMItem"].GetValueOfString(null) );
//ThisForm.PrimaryIDOCollection.CurrentItem["Location"].SetValue( ThisForm.Components["dropListQMItemFromLocation"].GetValueOfString(null) ); <------------------
ThisForm.PrimaryIDOCollection.CurrentItem["Location"].SetValue("FIFTEEN"); <-----------------------------------------
ThisForm.PrimaryIDOCollection.CurrentItem["Quantity"].SetValue( ThisForm.Components["editQMQuantity"].GetValueOfString(null) );
ThisForm.PrimaryIDOCollection.CurrentItem["RequestedBy"].SetValue( ThisForm.Components["editCurrentUsername"].GetValueOfString(null) );
ThisForm.PrimaryIDOCollection.CurrentItem["RequestType"].SetValue( ThisForm.Components["dropListRequestType"].GetValueOfString(null) );
ThisForm.PrimaryIDOCollection.CurrentItem["QuantityMoveToLocation"].SetValue( ThisForm.Components["comboBoxQMToLocation"].GetValueOfString(null) );
For some reason, no matter what I do to my Location field, I always get: The Location entered cannot be null in METHOD_NAME. INSERT rolled back.
Deliver To, Delivery Type, and Item are all required as well & none have this problem. I've verified that the component does have a value. Please help.