Showing posts with label Application Item. Show all posts
Showing posts with label Application Item. Show all posts

Tuesday, April 16, 2013

The problem of strings with more than 4000 chars in different regions

When you create an object (item, process, validation, ...) in APEX with the application builder there are properties like messages, conditions and comments. These properties using a string with more than 4000 characters will encounter an error like that:

Even when you use an item Value like


 and the value of this item is longer than 4000 characters, it will result in runtime in this error:

In my case i had to print out a message for the user which could be longer than the 4000 characters.
One solution for my case was to use jQuery and Dynamic Actions to print out the content of an item.
I created the Dynamic Action on the Global Page (Page 0) with these attributes:
The JavaScript Code is:  $('.uMessageText').append($v('P0_TEST'));
Of course there are other ways like described in my oracle-forum thread, but i hope the next apex versions will solve these problems.

Friday, February 1, 2013

APP_PAGE_ID=0 in OnDemandProcess

In APEX we have many Substitution Strings. One of these is :APP_PAGE_ID. Be careful with this String in an OnDemandProcess. I have called an OnDemandProcess by using JavaScript/AJAX and the result was, that :APP_PAGE_ID was always 0.
To solve this problem i have created an Application Item (AI_APP_PAGE_ID). This item will be filled every time a page is rendered in APEX.

*Update*
Due some good tips the problem can be solved by calling the OnDemandProcess with the correct full syntax from JavaScript.
var ajaxCall = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=IS_HANDLE_VALID', $v('pFlowStepId'));
With this call especially the last parameter $v('pFlowStepId') the pageId will be the actual ApexPageId where the Javascript is used.
Thanks to Peter and Roel for your tips.