Question

Mobile App is not evaluating the variables correctly on Page_Load

  • 3 November 2023
  • 3 replies
  • 39 views

Userlevel 7
Badge +8

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

Userlevel 7
Badge +8

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. 

 

Userlevel 7
Badge

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

Userlevel 7
Badge +8

Hi @Chris Hackett 

no I did not find any resolution 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved