Skip to main content

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.Cachesptypeof(AccessInfo)].Current;
int? contactID = PXAccess.GetContactID().GetValueOrDefault();
Guid? userID = CommonServiceLocator.ServiceLocator.Current.GetInstance<ICurrentUserInformationProvider>().GetUserIdOrDefault();

MyDAC myDAC = (MyDAC)this.ds.DataGraph.Cachesptypeof(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?

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. 

 


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


Hi @Chris Hackett 

no I did not find any resolution 


Reply