Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 16th December 2016, 12:43
nehagarg nehagarg is offline
Junior Member
 
Join Date: Jan 2009
Location: Mumbai
Posts: 22
nehagarg is on a distinguished road
Baan: Baan IV,LN6.1 - DB: Oracle - OS: windows
Not able to disable standard command using hook standard.command.is.allowed
Baan: ERP LN 6.1 FP8 (Infor ERP 10.2)
C/S: None/Unknown

Hi,

I am trying to disable add.set standard command using 'standard.command.is.allowed' and also I included <bic_4gl2> in the program script, but still 'add.set' is not getting disabled even function is not getting called. Is there any issue with TIV?. Kindly help

function extern boolean add.set.is.allowed()
{
some condition
return(false)
else
return(true)
endif

}
Reply With Quote
  #2  
Old 16th December 2016, 19:18
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,653
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
if - then

Hello,

from dev guide:
Code:
function extern boolean mark.delete.is.allowed()
{
    domain  fmfoc.oorg  origin.of.order

    fmfoc.dll0100.get.origin.of.order(fmfoc200.orno, origin.of.order)
    if origin.of.order <> fmfoc.oorg.man then
        return(false)
    endif

    return(true)
}
Code:
function extern boolean add.set.is.allowed()
{
     if <your condition> then
        return(false)
    endif

    return(true)
}

When called

The 4GL engine will call one or more of these hooks just before the following event sections are executed:

before.display.object
Here commands are handled whose enabling depends on values of the whole occurrence. E.g. based on a status field the occurrence should be disabled and may not be deleted.

For editable overview sessions the MODIFY.SET command is handled.

For details session the MODIFY.SET, MARK.DELETE and TEXT.MANAGER commands are handled.

(MODIFY.SET influences whether the whole occurrence will be disabled).

read.view subevent of the main.table.io event
Here commands are handled whose enabling depends on the current view. E.g. a closed order does not allow lines to be added, or deleted. The order number field can be in the view.

For overview sessions the ADD.SET and GLOBAL.DELETE commands are handled.

For details sessions the ADD.SET command is handled.

For both types of sessions, the disabling of the DUPL.OCCUR command will be based the ADD.SET command, since DUPL.OCCUR is actually adding a record with default values.

after.choice subevent of the choice.mark.occur event
Here commands are handled whose enabling depends on whether records are marked. If one record is marked the DUPL.OCCUR, MARK.DELETE and TEXT.MANAGER commands are handled. DUPL.OCCUR is only handled in case the session has view fields, because the view may forbid lines to be added.

Regards
__________________
//Bernd
Reply With Quote
  #3  
Old 19th December 2016, 06:39
nehagarg nehagarg is offline
Junior Member
 
Join Date: Jan 2009
Location: Mumbai
Posts: 22
nehagarg is on a distinguished road
Baan: Baan IV,LN6.1 - DB: Oracle - OS: windows
I tried, but add.set.is.allowed is not getting called.
Reply With Quote
Sponsored Links
  #4  
Old 19th December 2016, 09:54
sachinbaan's Avatar
sachinbaan sachinbaan is offline
Senior Member
 
Join Date: Oct 2013
Posts: 166
sachinbaan is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: Microsoft Server
Hi,

You can try , disable.commands(ADD.SET)
__________________
Regards,
Sachin

TO DREAM THE PERSON U WOULD LIKE 2 B, IS 2 WASTE THE PERSON U R.
Reply With Quote
  #5  
Old 19th December 2016, 14:10
kevalghelani's Avatar
kevalghelani kevalghelani is offline
Junior Member
 
Join Date: Nov 2013
Location: Mumbai
Posts: 23
kevalghelani is on a distinguished road
Baan: Infor ERP LN(fp-9) - DB: Sql Server - OS: window 7
Hi Neha,

I am not sure about your session design. But as per the programmer guide:

read.view subevent of the main.table.io event
Here commands are handled whose enabling depends on the current view. E.g. a closed order does not allow lines to be added, or deleted. The order number field can be in the view.

For overview sessions the ADD.SET and GLOBAL.DELETE commands are handled.

For details sessions the ADD.SET command is handled.

For both types of sessions, the disabling of the DUPL.OCCUR command will be based the ADD.SET command, since DUPL.OCCUR is actually adding a record with default values.

So, I guess, session must have view field in order to execute add.set.is.allowed().


-Keval Ghelani
__________________
Our Greatest weakness lies in giving up, The most certain way to succeed is always to try one more time.
Reply With Quote
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
How to disable standard session insert button sam291091 Tools Development 4 11th February 2014 12:09
disable standard command Customize Grid mpfaender Tools Development 4 17th November 2011 09:01
Disable a field in standard FIND command shriram Tools Development 23 16th May 2006 20:06
Wrong standard cost used in Integration Transaction Lines handyb Finance, Invoicing and Integration 3 25th October 2005 05:38
Standard Costing Doug Jefferson Finance, Invoicing and Integration 3 23rd May 2003 22:51


All times are GMT +2. The time now is 02:58.


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