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 26th November 2014, 15:01
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
Question Disabling New button on MMT
Baan: ERP LN 6.1 FP9
C/S: Both

Hi Guys,

I'm facing a strange problem... Unable to Disable the New Button on the MMT.
I'm developing a customization where based on some parameter settings I need to disable the new button on the MMT. (i.e. Data will be filled through a "generate session". Manual New is not allowed.)

I have written code in DAL- method.is.allowed() to disable new if the DAL_NEW action is not occurring by my "generate session". So for all the other places new button should be disabled.

But to my surprise the New button remains enabled on MMT; even when the method.is.allowed(DAL_NEW) returned false.

I tried adding add.set.is.allowed() on UI template with UI script... Even this didnt worked.

I also tried disable.commands("add.set") in init.group of group.1 section. even this is not disabling.

I'm able to disable duplicate, delete, modify, etc... But the new is not getting disabled on MMT.

So, is it that... We cannot disable new button on MMT?

Thanks,
Ganesh
Reply With Quote
  #2  
Old 26th November 2014, 15:17
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

Did you tried using Session -> Specific -> Standard Commands -> Remove Tick from New?

Also, you can write:-

Code:
before.program/before.display.object:

disable.commands(ADD.SET)

I guess you added "(double quotes) which caused the problem.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
Sponsored Links
  #3  
Old 27th November 2014, 06:48
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
Thanks Bhushan,
As disable.commands() cannot be used in before.program section I tired it in before.display.object section.
And it works. I would have wrongly tried with double quote in my initial try I guess...

But now the doubt is: Why the DAL Hook-> method.is.allowed returning false for DAL_NEW didn't disable the new button?

Let know if you have any idea on this.

Thanks Again!
-Ganesh Pillai

Last edited by pillai.ganesh : 27th November 2014 at 06:56.
Reply With Quote
  #4  
Old 27th November 2014, 08:46
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

What you can try is, remove the DAL from the script and only try the UI Template in your program script.

Code:
function extern boolean add.set.is.allowed()
{

    if condition_not_met then
        return(false)
    endif

    return(true)
}


Also, use #include <bic_4gl2> in your script. May be you have a DAL as well which is conflicting.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 27th November 2014, 13:45
vinay sharma vinay sharma is offline
Junior Member
 
Join Date: Nov 2010
Posts: 13
vinay sharma is on a distinguished road
Baan: LN - DB: oracle - OS: 7
Hi Ganesh,

Try This:

function extern boolean method.is.allowed(long type)
{
on case type
case DAL_NEW:
if (ur condition) then
return (false)
endif
break

endcase
return (true)
}
this will definitely help you.

Regards,
Vinay Sharma
Reply With Quote
  #6  
Old 28th November 2014, 07:17
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
Guys,

I have already tried that... UI template alone/ DAL alone/ UI template and DAL both trying to disable the new button. They didn't work for MMT. For normal sessions they work 5in.

Only disable.commands(ADD.SET) written in UI Script works.
Will update the thread if I find any thing on this.

Thanks for your Help.

-Ganesh
Reply With Quote
  #7  
Old 28th November 2014, 08:45
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 49
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
Hi Ganesh,

What is the TIV number for your script and porting set of Enterprise server? is it less than 1050 then try making it atleast 1050 or higher and re-compile the script.

Regards,
Gaurav Kumar
Reply With Quote
  #8  
Old 28th November 2014, 13:50
pillai.ganesh's Avatar
pillai.ganesh pillai.ganesh is offline
Senior Member
 
Join Date: Apr 2011
Location: United Arab Emirates
Posts: 105
pillai.ganesh is on a distinguished road
Baan: ERP LN 6.1 - DB: Oracle, SQL, Informix - OS: Windows
TIV number is 2000
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
Problem with showing Button on Session aamir_faried Tools Development 2 25th August 2010 15:41
Disabling cancel button zfadel DEM & Workflow 1 15th May 2009 14:56
Problem With MMT Session vinayakbaan Tools Development 1 9th October 2006 14:20
Default Button Action albertsmid Tools Development 3 18th July 2006 14:41
Change Button Position mr_suleyman Tools Development 3 7th November 2005 09:28


All times are GMT +2. The time now is 08:06.


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