PreCanInvoke on Siebel 7.8 (No Script)

It is a little known fact that there is support for a special (undocumented) property that allows one to get rid of the scripting normally used to do PreCanInvoke for methods on applets.

It was recommended in one of our ES reviews, but i do not use it all the time. Why?

Because it dosnt work on every applet, so you still need to script this behaviour on most applets.

Although you do get a special feeling when it does work, knowing that you saved the application some scripting.

For those who want to give it a try, this is the syntax (your mileage will vary):

Property: CanInvokeMethod: <MethodName>
Value: <Expression>

Note: This user property supposedly only works in FrameBase or FrameListBase class applets, but i've found this isnt the case, however this method is documented in Siebel 8.0, so expect it to be more reliable from this version onwards.


Reactions:

2 comments:

  1. Hello

    I came accross some situations where I find painfull to deploy my CanInvoke method on every applet (7.8 and 8 env) or where this applet user prop is not available (7.7 env).

    Here is a way to conditionally give access to a certain BC method/function:

    BC User Prop:
    Key :EventMethod Enabled: EventMethod
    Value : "[Id] IS NOT NULL" (example)

    The constraint is that you have to name your new method "EventMethod".

    Another advantage/side effect of naming your customized method "EventMethod..." is the fact that C++ class will never be invoked.
    So no more "No such a specialized method exist.." message when building "new method" logic through Declarative Run Time Event (NameMethod function doesn't have this kind of problem)

    ReplyDelete
  2. Strange, I don't know why some name have been truncated.

    "
    Key : EventMethod Enabled: EventMethod...
    (Example EventMethod_BEN)
    "

    "
    The constraint is that you have to name your new method "EventMethod...".
    "

    ReplyDelete

Comments are open to all, please make it constructive.