AnsweredAssumed Answered

Spel Attachments : get related request

Question asked by GIPSI on Apr 7, 2016
Latest reply on Apr 8, 2016 by GIPSI

Hello,

 

I'm desperately trying to get the id of related request of an attachment.

I tried several method, like getting "requests.cr", or like this :

 

string _id, crPersid, whereClause;

    _id = (string)argv[3];

    whereClause = format("attmnt =%s",_id);

  

     send_wait(0, top_object(), "call_attr", "api", "get_lrel_values", "lrel_attachments_requests", whereClause,"cr");

//   send_wait(0, top_object(), "call_attr", "lrel_attachments_requests", "val_by_key", "attmnt", _id, 1, "cr");

 

    if (msg_error()) {

        logf(ERROR, "Erreur lors de la récupération de l'incident lié la PJ '%s': '%s'", _id, msg[0]);

    } else {

        crPersid = msg[0];

        logf (SIGNIFICANT, "ATTMNT replication for request = %s", crPersid);

    }

 

And the 2 send_wait ethod are not working.

 

Every idea is welcomed !

 

Thanks in advance.

 

Chris.

Outcomes