You need to sign in to do that
Don't have an account?
Olof-ISA
Missing entity type information - when updating Opportunity
Hi
Could someone please have a look at the code below and tell me why I get this error when running the s-control:
{faultcode:'soapenv:Client', faultstring:'Missing entity type information. sObject requires a separate 'type' field be sent.',}
The Establishment_Account__c is a lookup field to an account I created in the same process and the EstAccId is the Id from the created result set. It is the update call that raises the error.
Thanks in advance!!!
/Olof
<script src="/soap/ajax/11.0/connection.js"
'
'
var OppUpdate = sforce.connection.query("Select Id, Type, Establishment_Account__c FROM Opportunity where ID='" + "{!Opportunity.Id}" + "'");
if (OppUpdate.classname == "SoapFault")
{
alert("Error setting Link to newly created Establishment. Error: " + OppUpdate.toString());
}
else
{
if (OppUpdate.size > 0)
{
OppUpdate.Establishment_Account__c = EstAccId;
sforce.connection.update([OppUpdate]);
}
}
'
'
'
Could someone please have a look at the code below and tell me why I get this error when running the s-control:
{faultcode:'soapenv:Client', faultstring:'Missing entity type information. sObject requires a separate 'type' field be sent.',}
The Establishment_Account__c is a lookup field to an account I created in the same process and the EstAccId is the Id from the created result set. It is the update call that raises the error.
Thanks in advance!!!
/Olof
<script src="/soap/ajax/11.0/connection.js"
'
'
var OppUpdate = sforce.connection.query("Select Id, Type, Establishment_Account__c FROM Opportunity where ID='" + "{!Opportunity.Id}" + "'");
if (OppUpdate.classname == "SoapFault")
{
alert("Error setting Link to newly created Establishment. Error: " + OppUpdate.toString());
}
else
{
if (OppUpdate.size > 0)
{
OppUpdate.Establishment_Account__c = EstAccId;
sforce.connection.update([OppUpdate]);
}
}
'
'
'