exception RRS feed

  • Question

  • in application.vd define a global variable as Partner entity :

    Friend myuser as partner

    in new expense entity:


    Me.expenseProperty = Newexpense()

    Me.expense.muser = Me.application.myuser

    it leads to : InvalidOperationException



    Me, __expense.DetailsClass.PropertySetProperties.muser, Value)


    this was working in vs2012. it seems the thread where the new expense is maintained can not access the global Friend application variable.

    any idea why / how to get this running. Maybe I was "benefiting" from a bug in previous releases or maybe this one fails...

    the idea behind is to limit requests to the server saving as app entities the most often reused entities to be able to assign them to any new entity where they are linked to as *...1

    Thursday, March 19, 2015 8:27 AM


  • Hi,

    Based on my understanding, you used APP.XAML.vb to define global variable, am I right? If so, please create property in APP.XAML

    Private _gloVar As String 
    Property gloVar() As String
    Return _gloVar
    End Get
    Set(ByVal value As String)
    _gloVar = value
    End Set
    End Property

    Then in XAML's code behind create object for APP and then get the current instance.

    Dim objApp As App = App.Current 
    objApp.gloVar = "Value"

    If you want to use this variable, you can try as following code.

    Dim objApp As App = App.Current
    TextBlock.Text = " values are: " + objApp.gloVar

    Please check as above steps again, hope it works, if I misunderstand, please feel free to let me know and follow up with more detailed information.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 20, 2015 5:45 AM