CA Service Management

 View Only
  • 1.  How to do condition to UUID field in MOD file?

    Posted Nov 15, 2016 05:21 AM

    Hi,

    I have a mod and spl file in majic folder, I want to trigger a function only when customer equal to specific value

    I didn't found how to do this

     

    I tried something like this:(but didn't work)

     

    OBJECT cr {
       TRIGGERS {
          POST_VALIDATE z_save_cust() 660 FILTER(EVENT("INSERT") &&

    customer=U'0EDBC99A7D7A0449AF5B1D70E03983CF');
       };
    };

     

    please advice

    Thank you



  • 2.  Re: How to do condition to UUID field in MOD file?

    Posted Nov 15, 2016 06:51 AM

    Sorry, but mod file don't support UUID attribute type.

    You could use same filter on spl level:

    if (customer.id == (uuid)"0EDBC99A7D7A0449AF5B1D70E03983CF") {
      <your_code>
    }

    in theory this code should work slower but I hope you'll never notice the difference

     

    Regards,

    cdtj



  • 3.  Re: How to do condition to UUID field in MOD file?

    Posted Nov 16, 2016 02:04 AM

    Hi,

    that's what I did, I tried to save the unnecessary code execute

    Thank you



  • 4.  Re: How to do condition to UUID field in MOD file?

    Posted Nov 16, 2016 01:56 AM

    Hi IdanA,

     

    if your contacts userid is unique, maybe you use user id like this in mod file, you can try it.

     

    POST_VALIDATE z_save_cust() 660 FILTER(EVENT("INSERT") && customer.userid == '<userid>');

     

    Regards,

    Türker



  • 5.  Re: How to do condition to UUID field in MOD file?

    Posted Nov 16, 2016 02:05 AM

    In mod file you cannot use attribute with dot sign only in spl file