Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

apex_page.get_url issue

RonMatJul 6 2022

Hi, Am running APEX 22.1.0 version. My issue is around create email links back into the application. My application was using normal URL's but I changed to friendly URL. this is when the problem started.
Because the size of the procedure code I had to make a procedure and call from APEX. I also need to run the same procedure from a JOB process.
Previously I was using LINK_ID := apex.mail.get_instance_url || apex_page.get_url(xxxxxxxx);
and this work perfectly. But once I moved to friendly URL. Via APEX page call to the proc from APEX works as expected. But running the same proc via a job process the i get
https://xxx.xxx.xxx/https://xxx.xxx.xxx/apex/r/dev/application/page?sessionid
Is this an Oracle bug or can there be an issue with the APEX hosting that caused this issue?

Comments

InoL

I have noticed this too on apex.oracle.com (although with a slightly different outcome). To get the full URL, use

APEX_UTIL.HOST_URL()||APEX_PAGE.GET_URL(p_application => 'MYAPP', p_page => 1);
RonMat

Hi, Using APEX_UTIL.HOST_URL()||APEX_PAGE.GET_URL(p_application => 'MYAPP', p_page => 1); is fine within APEX.
But it looks like APEX_PAGE.GET_URL provides the whole URL when run from a job process not just the apex/r/dev/application/page?sessionid
As this provides the full link via a job process
V_USER_LINK := apex_page.get_url(p_application => V_APP_ID ,p_page => 30, p_items => 'P30_BADGE_NO',p_values => member_id);
But I have to use the following via APEX
V_USER_LINK := 'https://indigo.maxapex.net/'||
apex_page.get_url(p_page => 30, p_items => 'P30_BADGE_NO',p_values => member_id);
I just not understand why?

1 - 2

Post Details

Added on Jul 6 2022
2 comments
899 views