New Comment System@Siebel Unleashed.. Do Try and give me feedback | Next Tip »Home

EventMethod – a new way to enable the button.

OkAvarageGoodVery GoodExcellent (9 votes, average: 4.56 out of 5)
Loading ... Loading ...

This is nice trick that I came to know recently from Nidhi Puri a friend of mine working in siebel from past 2 years. Till now there were 2 ways known to me to enable a button on an applet in Siebel.

  • Scripting at PreCanInvoke event of Applet
  • Named Method n User property

But there is another way of enabling the button on applet apart from these two.

Just prefix EventMethod in front of the method name you have given and it will automatically enable the button example

If you create a button and give method name as CopyScript then change it to EventMethodCopyScript it will automatically enable the button. But you need to change the method name at BC level too. So at BC Level the scripting will change to

if(MethodName == “EventMethodCopyScript”)

Nice clean way to enable the button.

 Happy Siebel development :)

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: , Read 387 articles by neel
  • Dilip
    When we already have a Scripting option, then how this "EventMethod" is useful.

    It would be useful when we just give EventMethodxyz as method name in applet control level and with out scripting, then it would really help the developers
  • Amol Tandon
    EventMethod works with the CSSBCBase class and it's derived classes it was not working for CSSBusComp Please check at your end as well. Please let me know if I am wrong
  • Bhaiji
    What I observed is EventMethod only prevents that Specialized method error because I was able to configure enable/disable button with CanInvoke Method Applet UP itself and in Value column use Calc Field if wants to enable/disable on some condition. Remember this UP works with 1 or 2 Applet Classes only. But problem is when you will click on the button then it will throw specialized error so we need to use EventMethod but not for enablig/disabling.
  • Guru
    Hi Neel,

    Could you please tell me how to change button caption dynamically.

    Thanks in Advance.

    Regards,
    Guru
    +91-9903008585
  • Sunny Sunday
    hi Neel,

    did you ever try 'EventMethod Enabled' for conditionaly enabling / disabling button as its not working for me....

    Thanks!
  • Hi Neel, I just found that Named Method user property does not executes on CSSBusComp based BCs.

    I was configuring a button on a custom BC based on CSSBusComp but button was not becoming active .. then i just changed class to CSSBCBase .. button became active and running....


    Even user Event Method trick doesnt work on applet based on CSSBusComp class BCs.

    I think it is the simplest Class of Siebel BCs. can be quite usefull for thin BCs.

    Hope it helps somebody someday!
  • Raghu
    EventMethod is working fine in thin client..
    but for protal is not working..

    what to done for portal applications?
  • VerteX
    >> Name: CanInvokeMethod YourMethod
    >> Value: TheApplication().ActiveViewName() = YourEnabledButtonView

    You should use GetProfileAttr ('ActiveViewName') instead.
    Value: GetProfileAttr ('ActiveViewName') = YourEnabledButtonView
  • Pedro Prats
    VR: you could use the solution i provided earlier
    Add an Applet User Property like this:
    Name: CanInvokeMethod YourMethod
    Value: TheApplication().ActiveViewName() = YourEnabledButtonView

    I'm not sure ActiveViewName works there. If not use this on PreCanInvokeMethod of your applet:
    function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
    {
    var iReturn = ContinueOperation;

    if(MethodName=="YourMethod"){
    try{
    iReturn = CancelOperation;
    if(TheApplication().ActiveViewName() == "YourEnabledButtonView") CanInvoke = "TRUE";
    else CanInvoke = "FALSE";
    }catch(e){}
    finally{}
    }

    return (iReturn);
    }

    tell me if any of it worked.
  • Pedro Prats
    there is a Applet User Property called CanInvokeMethod. Say you want to enable button Foo, which is invoking FooMethod method. Add a Applet User Property entry like this:
    Name: CanInvokeMethod : FooMethod
    Value: TRUE

    You may declare you want this method to be enabled depending on any expression. For example, only when record are showed:
    Value: [Id] IS NOT NULL

    Can't think of a cleaner way to do this...
  • VR
    i need to enable button on one view and need to disable to other views but applet is same in all the views..any idea, how can we do this through configuration?
  • Abhinav
    Hey man this EventMethod is not working for me. I tried it just as R&D for enabling a button but it didn't work.
    There is no script for that button.
  • Gaurav
    HI, we r woking on Siebel 8.0.1
    We have chnaged the font for the whole application from 9 to 11.Now the problem is that the font of View Tabs is also increased and they are not properly visible in UI.Kindly help me in finding out the way?
  • neel
    I have tried it in 7.7 and 7.8

    on which version are you working..
  • Rahul
    Is this property work on specific version of Siebel Tools or with specific class. I tried but it doesnt work for me.
  • neel
    Try login through dbisqlc.exe so that you are sure that there is no problem with dbf.

    I will suggest you to put the problem in Siebel forum as others might also be able to help you out the link to the forum is

    http://forum.siebelunleashed.com
  • I AM HAVING THIS ERROR WHILE I AM LOGGING TO SIEBEL TOOLS USING LOCAL DATABASE
    SBL-SEC-10018: You have entered an invalid set of logon parameters. Please type in your logon
    parameters again.(SBL-DAT-00446)
    Invalid user ID or password
  • Santhaa
    Neel,

    I Just tried, a quick way to make a New Button visible.
  • Ajay
    Thankyou neel it is working fine now...Can u please tell me about the "Named Method n" user property to enable or disable a button..i havenot use that till now..Thanks in advance
  • neel
    You have to change the name at 2 places

    Applet : MethodName
    BC Scripting

    if your method was Remove then change Applet Method Name as EventMethodRemove

    It will activate the button if you have script associated with it then you will need to change the method name in scripting.

    Hope that clears how to do it
  • Ajay
    but i didn't work for me....My method name was "Remove" and in BC i have given it as
    if(MethodName == "EventMethodRemove")..the button is not activated...did it work for u?
  • neel
    yes that is correct
  • Ajay
    u mean to say that if we give method name as "Hai" in applet control level then we need to use it as "EventMethodHai" in scripting..is that correct? please be clear...
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...