Friday, August 30, 2019

Oracle APEX: url inside email contains ROWID

If your email contains a url which has ROWID as part of it, be careful because sometime the ROWID has some 'special' character which the browser will 'convert' it to 'space' and when that happens, ur url will broke(today I have one record which has the '+' in the ROWID).

Here is how to get it address:

inside your email procedure, replace the rowid with APEX_UTIL.URL_ENCODE(IN_ROWID), so your procedure will looks like this:

Before change:

create or replace procedure my_email(in_rowid varchar2) is
begin
 ...
 ...
 url:='https://xxx/apex/f?p=207:442:::NO::P442_ROWID:'||in_rowid;
...
end;

After change:

create or replace procedure my_email(in_rowid varchar2) is
begin
 ...
 ...
 url:='https://xxx/apex/f?p=207:442:::NO::P442_ROWID:'||APEX_UTIL.URL_ENCODE(in_rowid);
...
end;

No comments:

Post a Comment