I am migrating an app from old apex to the new version. some of my pages are not saving the new changes that I am making. for example this is my query for a page item from the old apex environment:
select DESCRIPTION display_value, DESCRIPTION return_value
from AUC_AUCTION_TB
where admin_emailaddress =
(select email
from SYSTEM_USERNAME_TB
where username = :APP_USER) or :APP_USER in ('SESH','PETS','ROPO','JEMU','HESH')
order by START_DATE desc
So I want to make some changes to the query in the new environment, because the new environment is using a different table. My new query is:
select DESCRIPTION display_value, DESCRIPTION return_value
from AUC_AUCTION_TB
where admin_emailaddress =
(select EMAIL
from ALL_USERS
where USERNAME = :APP_USER) or
:APP_USER in ('SESH','tshithigonap','poolmar','muhulumaj','shipaleh')
order by START_DATE desc
The problem is when I make this changes the page is not being saved with the new changes, I keep getting this pop up:
There are unsaved changes. Press Ok to discard your changes or Cancel to return to the current page.
So when I go to a different page and then come back to my page, I notice non of my changes have been saved, even though I clicked the save button. Is something wrong with my query perhaps or why is this happening, I have many pages with this issue, please help.
CodePudding user response:
It doesn't have to be that query (it looks OK); there's something else that is wrong on that page. What? Check errors, here:
That's a dummy error I just produced, just to illustrate the issue; you'll get some other message. Then click on each of those messages - Apex will take you to that very spot.
CodePudding user response:
If the query in your example gets executed correctly in a separate worksheet, there's probably an issue in passing the bind variables or setting the correct type of region. Maybe try using v('APP_USER') instead of :APP_USER.