[Vtigercrm-developers] Create new entity

Alan Lord (News) alanslists at gmail.com
Mon Mar 21 11:10:54 GMT 2016


On 21/03/16 03:46, Preexo wrote:
> I am extending a custom extension with an AJAX action which is going to
> create new Asset entities. But at the moment I am struggling with the
> creation of new Assets. I am creating a new asset like this:

Why are you creating a new entity like this? How is this code triggered?

You _should_ use the server api "Create".

http://community.vtiger.com/help/vtigercrm/developers/server-apis.html#create

> But I always get the message "Sorry! Attempt to access restricted file."
> when calling the save method, all other things work fine.

This is a file access issue. This message comes from a few functions in 
either CommonUtils or the vtlib Deprecated.php. (Learn grep - it will 
help a lot).

Got any symlinks? Got any svn or other hidden files?

HTH

Al

-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list