Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Creating an Opportunity with webservices
I am trying to create an opportunity through the phptoolkit. However, I am receiving the following error:
nsWriteResponse Object ( [isSuccess] => [statusDetail] => Array ( [0] => nsStatusDetail Object ( [code] => INSUFFICIENT_PERMISSION [message] => You do not have permissions to set a value for element contribution due to one of the following reasons: 1) The field is read-only; 2) An associated feature is disabled; 3) The field is available either when a record is created or updated, but not in both cases. [type] => ERROR ) ) [recordRef] => )
Here is my php code:
[PHP]$opp = new nsComplexObject("Opportunity");
$roleRef = new nsRecordRef(array(
"internalId" => -2
nsWriteResponse Object ( [isSuccess] => [statusDetail] => Array ( [0] => nsStatusDetail Object ( [code] => INSUFFICIENT_PERMISSION [message] => You do not have permissions to set a value for element contribution due to one of the following reasons: 1) The field is read-only; 2) An associated feature is disabled; 3) The field is available either when a record is created or updated, but not in both cases. [type] => ERROR ) ) [recordRef] => )
Here is my php code:
[PHP]$opp = new nsComplexObject("Opportunity");
$roleRef = new nsRecordRef(array(
"internalId" => -2
0