Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » list1/list2 - prevent opening detail screen
list1/list2 - prevent opening detail screen [message #5692] Sat, 02 July 2016 09:44 Go to next message
htManager is currently offline  htManager
Messages: 415
Registered: May 2014
Senior Member
Hello Tony,

how can I prevent the opening a list2 (table2) screen from a list1 (table1) screen?

At the moment I solved this situation in this way:
In the _cm_getInitialData ($fieldarray) method of the class file of table2 I set an error with $this->errors[]='..'; when trying to add a new record.

The better way would be that the user can't open the list2 screen if the value doesn't match.
Re: list1/list2 - prevent opening detail screen [message #5693 is a reply to message #5692] Sat, 02 July 2016 11:44 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
I do not understand what you mean. If you don't want any user to open a LIST2 task from a LIST1 task then don't put the LIST2 task on the list of navigation buttons for the LIST1 task.

If you are saying that there are some circumstances when it is valid but others when it is not then what are those circumstances?

When you say "the user can't open the list2 screen if the value doesn't match" which two values are you talking about?


Re: list1/list2 - prevent opening detail screen [message #5695 is a reply to message #5693] Sun, 03 July 2016 05:42 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 415
Registered: May 2014
Senior Member
It depends on the rdcaccount_id value. I created 'channels' in my application with workout exercises incl. videos. The 'channels' in the shared accounts are visible for everyone. Now I want that 'channels' in a private account can be released for other private accounts via a popup.
I want to prevent a user in a private account to call (from list1 screen) the release list2 screen for a shared account channel.
Re: list1/list2 - prevent opening detail screen [message #5697 is a reply to message #5695] Mon, 04 July 2016 04:09 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
You cannot prevent a child task from being called from a navigation button as it is available for every record that is being displayed. All you can do is put some checks within the child task to see if it can actually proceed or not when it is run. If not, then it should return to the parent task with a suitable error message.

Re: list1/list2 - prevent opening detail screen [message #5698 is a reply to message #5697] Mon, 04 July 2016 09:03 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 415
Registered: May 2014
Senior Member
Do I have to do the checks in the class file? And with which function?
Re: list1/list2 - prevent opening detail screen [message #5700 is a reply to message #5698] Mon, 04 July 2016 13:02 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
Yes, you have to insert custom code into the relevant class file. The best method to use would be _cm_initialise() as this is the first method which is called. If this generates an error then control is immedoately returned to the calling transaction.

Previous Topic: File Picker - File name changing
Next Topic: Filepicker
Goto Forum:
  


Current Time: Thu Mar 28 17:49:21 EDT 2024

Total time taken to generate the page: 0.01092 seconds