Skip to main content
Question

Mobile App is not evaluating the variables correctly on Page_Load


aaghaei
Captain II
Forum|alt.badge.img+10

Hello all,

I need to write some codes in “Page_Load”. I have done the coding and it works flawless on browser. But, when I call the same method that results in Page_Load from the “Mobile App”, the Page_Load does not evalue the variables correctly or returns an unexpected value. here is the partial code: 

public partial class Page_HC509090 : PX.Web.UI.PXPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AccessInfo accessInfo = (AccessInfo)this.ds.DataGraph.Caches[typeof(AccessInfo)].Current;
        int? contactID = PXAccess.GetContactID().GetValueOrDefault();
        Guid? userID = CommonServiceLocator.ServiceLocator.Current.GetInstance<ICurrentUserInformationProvider>().GetUserIdOrDefault();

        MyDAC myDAC = (MyDAC)this.ds.DataGraph.Caches[typeof(MyDAC)].Current;

        // Do stuff
    {
}

To add a little more context, when from screen A an action button is pressed by a user, some suff happens then using “PXRedirectHelper.TryRedirect()” platform directs the user to screen B. The above Page_Load method is associated with the screen B and all above valiables are evaluted and asigned correctly BUT in “Mobile App”

  • accessInfo: has the admin info
  • contactID is Zero
  • userID is the admin PKID
  • myDAC is NULL

Any idea what is happening and how I can address the issue?

3 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1204 replies
  • November 3, 2023

Hi ​​​​​​@Mike Gifford I came across the below post while I was searhing the possible solutions to my inquiry. I also work on a similar case but I will be opening the redirect screen from both web and mobile app with applying some permissions and validations so that is why I am trying to access the user info and some data that I put into the the primary DAC of the target screen from the source screen(s). As you will see in my original post on web all works out just fine for me but the Mobile App is driving me crazy. Any help is appreciated. 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2769 replies
  • December 13, 2023

Hi @aaghaei were you able to find a solution? Thank you!


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • 1204 replies
  • December 17, 2023

Hi @Chris Hackett 

no I did not find any resolution 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings