[Vtigercrm-developers] Webservice revise "Permission to perform the operation is denied for id"
Alan Lord
alanslists at gmail.com
Thu Jun 7 16:10:30 GMT 2018
On 07/06/18 16:33, Alan Lord wrote:
> Not a terribly helpful message to be honest.
>
> I am trying to do a simple remote revision to a Contact record over the
> REST Webservices API using vtwsclib-1.6.
The issue was with the doInvoke method in the client.
This doesn't correctly format the payload:
* no 'element' key,
* and payload data not run through toJSONString().
as soon as I created a new client function called doRevise it worked.
> /**
> * Do Revise Operation
> */
> function doRevise($valuemap) {
> // Perform re-login if required.
> $this->__checkLogin();
>
> $postdata = Array(
> 'operation' => 'revise',
> 'sessionName' => $this->_sessionid,
> 'element' => $this->toJSONString($valuemap)
> );
> $resultdata = $this->_client->doPost($postdata, true);
> if($this->hasError($resultdata)) {
> return false;
> }
> return $resultdata['result'];
> }
More information about the vtigercrm-developers
mailing list