title: Invalid Property on Extended FIORI Application
body: <p>We are implementing an extended My Quotations Fiori application. Basically we added a new field Sales Order to the UI. The field fetches data from the backend so we also extended our OData service. On the first view, we can successfully call the data. But whenever we navigate to the next view via clicking Edit button, we get this error</p>
  
  <p>Property 'SalesOrder' is invalid. Choose "Refresh" to update pricing information.</p>
  
  <p>Anyone has an idea on how to solve this? </p>
  
  <p>Here is our custom code for S3 view controller. We used WEB IDE to create the extension btw. The second function is for the creation of the Sales Order whenever the quotation has no associated SO tied to it. </p>
  
  <pre><code>manageSalesOrderFields: function() {
      alert("manageSalesOrderFields");
      var salesOrderId = "";
  
      // hide all fields
      view.byId("salesOrderLabel").setVisible(false);
      view.byId("salesOrderText").setVisible(false);
      view.byId("triggerSalesOrderLabel").setVisible(false);
      view.byId("triggerSalesOrderButton").setVisible(false);
  
      $.getJSON("/sap/opu/odata/sap/zlord_my_quotation_srv/QuotationHeaderSet('" + quotationId + "')",
          function(data) {
              alert("enterHere");
              salesOrderId = data.d.SalesOrder;
              alert(salesOrderId);
              if (salesOrderId !== "" ){
                  view.byId("salesOrderLabel").setVisible(true);
                  view.byId("salesOrderText").setVisible(true);
              }else{
                  view.byId("triggerSalesOrderLabel").setVisible(true);
                  view.byId("triggerSalesOrderButton").setVisible(true);
                  view.byId("triggerSalesOrderButton").detachPress(sap.ui.controller("...").createSalesOrder);
                  view.byId("triggerSalesOrderButton").attachPress(sap.ui.controller("...").createSalesOrder);
              }
          });
  },
  createSalesOrder: function () {
      var createSalesOrderDialog = new sap.m.Dialog("createSoDialog", {
          title: "Create Sales Order",
          icon: "sap-icon://sales-order",
          content: [
              new sap.ui.core.HTML({content:"&lt;p style='margin:0;padding: 16px;'&gt;Do want to create a sales order?&lt;/p&gt;"})
          ],
          buttons:[
              new sap.m.Button({
                  text: "Yes",
                  press : function() {
                      var oModel = new sap.ui.model.odata.ODataModel('/sap/opu/odata/sap/zlord_my_quotation_srv/');
                      var oParameter = {
                          "QuotationID" : quotationId
                      };
                      oModel.callFunction('/CreateSalesOrder', 'GET', oParameter, 'null',
                          function (oData, oResponse) {
                              var responseMessage = JSON.stringify(oResponse.body);
                              var responseMessageStart = responseMessage.search('&lt;d:Message&gt;');
                              var responseMessageEnd = responseMessage.search('&lt;/d:Message&gt;');
                              responseMessage = responseMessage.substring(responseMessageStart + 11, responseMessageEnd);
  
                              //show MessageToast
                              sap.m.MessageToast.show(responseMessage);
                              view.byId("triggerSalesOrderLabel").setVisible(false);
                              view.byId("triggerSalesOrderButton").setVisible(false);
  
                              console.log(responseMessage);
                          },
                          function (oError) {
                              sap.m.MessageToast.show('Error - see log');
                              console.log(oError);
                          }
                      );
                      createSalesOrderDialog.close();
                      createSalesOrderDialog.destroy();
                  }
              }),
              new sap.m.Button({
                  text: "No",
                  press : function() {
                      createSalesOrderDialog.close();
                      createSalesOrderDialog.destroy();
                  }
              })
          ]
      });
      createSalesOrderDialog.open();
  }
  </code></pre>
  
  <p>We didn't edit anything on the next view controller (CreateQuotations.view.controller.js) since it is not relevant for us to show the SO number on that view. </p>