Performing webservice calls using validation - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18) +--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4) +--- Thread: Performing webservice calls using validation (/showthread.php?tid=2126) |
Performing webservice calls using validation - Guido1982 - 03-13-2021 I would like to perform webservice calls, but run the system validations when doing so. I remember we had special way of running the validations when performing webservices, but couldn't find it in the docs. RE: Performing webservice calls using validation - joebordes - 03-13-2021 https://corebos.com/documentation/doku.php?id=en:devel:corebosws:methodreference#validations_create_update_and_revise_with_validations RE: Performing webservice calls using validation - Guido1982 - 03-13-2021 Nice, couldn't find that through the search method in the wiki RE: Performing webservice calls using validation - Guido1982 - 03-15-2021 So this is not working for me. I refactored my webservice call from: PHP Code: $client->doCreate('Assets', $params); PHP Code: $client->doInvoke('CreateWithValidation', array('elementType' => 'Assets', 'element' => json_encode($params))); PHP Code: function isUniqueSerial($fieldname, $fieldvalue, $params, $entity) { RE: Performing webservice calls using validation - joebordes - 03-15-2021 check if your function is being called and dump the parameters to see if the query is correct RE: Performing webservice calls using validation - Guido1982 - 03-15-2021 What query? Ah you mean the validation query. I already spot the issue. The validation receives webservice ID's, where when inside the application, it receives non-webservice regular ID's. RE: Performing webservice calls using validation - joebordes - 03-15-2021 great. adapt your code accordingly RE: Performing webservice calls using validation - Guido1982 - 03-15-2021 Done, works like a charm now, thanks for the help RE: Performing webservice calls using validation - joebordes - 03-16-2021 great! |