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?