New Posts New Posts RSS Feed: VerifierCondition
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

VerifierCondition

 Post Reply Post Reply
Author
chuchay View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Oct-2007
Location: Philippines
Posts: 2
Post Options Post Options   Quote chuchay Quote  Post ReplyReply Direct Link To This Post Topic: VerifierCondition
    Posted: 04-Oct-2007 at 10:45pm

I am using a DelegateVerifier and I need to pass a parameter to my verifier condition but I can't seem to make it work. First question is, is it possible to pass a new parameter? If not, is there an alternate way? If possible, how do I do it? I am very new to DevForce.

Thanks in advance.
 
Back to Top
Yaron View Drop Down
Newbie
Newbie


Joined: 19-Jun-2007
Posts: 16
Post Options Post Options   Quote Yaron Quote  Post ReplyReply Direct Link To This Post Posted: 09-Oct-2007 at 9:40am
Can you maybe post some more specifics? what kind of variable are you attempting to pass, etc
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 09-Oct-2007 at 7:52pm

Try putting the delegate method in a new class whose constructor takes the parameter you need. You can then set a class member variable equal to the parameter. Since the delegate method lives inside the class, it has access to that class member variable.

  public class DelegateHolder {
   public DelegateHolder(String pSomeParameter) {
    mSomeParameter = pSomeParameter;
   }
 
    private static VerifierResult SomeCondition(
      Employee pEmp, TriggerContext pTriggerContext, VerifierContext pVerifierContext) {
      bool result;
      if (mSomeParameter = "foo" {
        // do something
      }
      return new VerifierResult(result);
    }
   private String mSomeParameter;
  }
 
Greg Dunn
IdeaBlade
Back to Top
chuchay View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Oct-2007
Location: Philippines
Posts: 2
Post Options Post Options   Quote chuchay Quote  Post ReplyReply Direct Link To This Post Posted: 09-Oct-2007 at 9:49pm
Thank you very much. I will try this and give you feedback. :)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down