AnsweredAssumed Answered

Make Attachment Required For Some Categories

Question asked by m.fahd on Feb 19, 2018
Latest reply on May 11, 2018 by Aleksandar_Stancic

Is it possible to prevent creating requests without an attachment for some request areas?

I tried the below:

 

mod file will be:

MODIFY cr POST_VALIDATE z_req_attmnt() 1000 FILTER (EVENT("INSERT"));

spl file:

cr::z_req_attmnt(...) {     if (category == "pcat:5109") {          send_wait(0, top_object(), "call_attr", "lrel_attachments_requests", "sync_fetch", "STATIC", format("cr = '%s'", persistent_id), -1, 0);          if (msg[1] == 0) {               set_error(1);               set_return_data(format("Attachments are required for [%s] area", category.sym));               return;          }     }}

but it doesn't seem to be working, because the alert is displayed even if a file is attached.

 

i believe that there is something missing in the spl file

so appreciate your feedback.

 

Mohamed El-Fahd

Outcomes