RelatedFlexGroupField stockLocFld = this.View.BillBusinessInfo.GetField(“FStockLocId”) as RelatedFlexGroupField;                 DynamicObject[] stockLoc = BusinessDataServiceHelper.LoadFromCache(this.Context, new object[] { cw }, stockLocFld.RefFormDynamicObjectType);                Entity entity = this.View.Model.BillBusinessInfo.GetEntity(“FEntity”);                DynamicObject rowObj = this.View.Model.GetEntityDataObject(entity,fsqe) as DynamicObject;                stockLocFld.DynamicProperty.SetValue(rowObj, stockLoc[0]);

stockLocFld.RefIDDynamicProperty.SetValue(rowObj, cw);