Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th February 2017, 10:13
krushna's Avatar
krushna krushna is offline
Member
 
Join Date: Feb 2015
Location: Coimbator
Posts: 31
krushna is on a distinguished road
Baan: infor LN 6.1 - DB: SQL - OS: windows 8
How to disable a Form Commands
Baan: ERP LN 6.1 FP10 (Infor ERP 10.4)
DB: SQL Server 2008 R2
OS: Windows 10
C/S: Both

Hello Gurus,

I have a sub session name "HTO Details" and have added this sub session in to a main session name "Item General" below has the screenshot

So what this sub session does is When the item has the HTO Details then it shows the details else it gives the message "HTO not Available"

So now my requirement is whenever the Item does not have any HTO Details the Form Command or "HTO Segments" button it self should get non editable in state of message "HTO not Available".


PLZ suggest me experts.
Thanks,
Attached Images
File Type: png Capture.1.PNG (8.0 KB, 16 views)
__________________
Regards,
krushna
Reply With Quote
  #2  
Old 10th February 2017, 18:24
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,639
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
form.command.is.allowed()

Hello,
Code:
form.command.is.allowed()
Syntax:

function boolean form.command.is.allowed  ()

Description

You can use this hook to define the conditions under which the form command should become enabled in the UI. The 4GL engine will use this hooks to determine whether the form command must be enabled or disabled.

Return values

The hook should return TRUE in case the form command is allowed. In that case the 4GL engine will enable the form command on the UI. In any other case the hook should return FALSE.

Context

This function can be used in all script types.

When called

Form commands are handled based on the Command Availability setting in the Form Commands session (ttadv3118s000):

Command Availability Always
The disabling of these form commands may depend on the values of the view fields. Therefore, these form commands are handled only when the session has view fields (form type 3). This applies to both overview and details sessions. The 4GL engine handles these commands just before the read.view sub-event of the main.table.io event section is executed.
Command Availability One Record Selected and Records Selected
In overview sessions these form commands are handled when one or more records are marked. The 4GL engine handles these commands just before the after.choice sub-event of the choice.mark.occur event section is executed.In details sessions these commands are handled when the occurrence is being displayed again. This is just before the before.display.object event section is executed.
Command Availability Never
These commands are never handled.
See standard.command.is.allowed() for more information regarding the event sections, and the type of commands that are handled when these events are executed.

Notes
The 4GL engine will also use the DAL business.method.is.allowed() hook to determine whether the form commands must be enabled or disabled.
First, the UI hook will be called. If this returns FALSE, the command will be disabled, if it returns TRUE (or if it does not exist), the DAL business.method.is.allowed() hook will be called. If this returns FALSE, the command will be disabled, else it will be enabled.
Example :
function extern boolean address.fmfoc200.sfad.is.allowed()
{
    if isspace(fmfoc200.sfad) then
        return(false)
    endif
    return(true)
}
No double post, please
http://www.baanboard.com/baanboard/s...ad.php?t=69747
Regards
__________________
//Bernd

Last edited by bdittmar : 10th February 2017 at 21:43. Reason: Comment, Link
Reply With Quote
  #3  
Old 13th February 2017, 13:01
krushna's Avatar
krushna krushna is offline
Member
 
Join Date: Feb 2015
Location: Coimbator
Posts: 31
krushna is on a distinguished road
Baan: infor LN 6.1 - DB: SQL - OS: windows 8
Unhappy

Thanks Guru,

Sorry tht,, I didt mention a point before.
Actually I can write the code only in sub session(HTO Details), not in main session(Item General) coz I do not have scipt in main session.

So what to do.
__________________
Regards,
krushna
Reply With Quote
  #4  
Old 15th February 2017, 06:35
krushna's Avatar
krushna krushna is offline
Member
 
Join Date: Feb 2015
Location: Coimbator
Posts: 31
krushna is on a distinguished road
Baan: infor LN 6.1 - DB: SQL - OS: windows 8
Thanks Guru,

Sorry tht,, I didt mention a point before.
Actually I can write the code only in sub session(HTO Details), not in main session(Item General) coz I do not have scipt in main session.

So what to do.



Any one have any suggestion PLZ.....
__________________
Regards,
krushna
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Disable Form Command from DEM amitsdotcom DEM & Workflow 1 6th December 2012 12:28
Conditionally Disable form 2 of Dynamic Form RobertP Tools Development 5 27th June 2012 20:33
disable records in a type 3 form jatin_sanghi Tools Development 3 18th May 2005 11:37
Section for Form Commands? lbencic Tools Development 8 10th April 2003 14:29


All times are GMT +2. The time now is 19:25.


©2001-2017 - Baanboard.com - Baanforums.com