You need to sign in to do that
Don't have an account?
Maxplore
}
Unable to update custom object
Hi,
I am trying to update a custom object using "update" method. Though I am able to create new records in this object. Here is the piece of code I am using:
var acc1:SObject = new SObject('RMA_Shipment_Line__c');
acc1.Id = "a0e500000004dLlAAI";
apex.update([acc1], new AsyncResponder(
function (result:Object):void {
// var strId:String = (result[0] as SaveResult).success;
Alert.show((result[0] as SaveResult).errors[0].message);
//Alert.show(strId);
}, genericFault
) );
acc1.Id = "a0e500000004dLlAAI";
apex.update([acc1], new AsyncResponder(
function (result:Object):void {
// var strId:String = (result[0] as SaveResult).success;
Alert.show((result[0] as SaveResult).errors[0].message);
//Alert.show(strId);
}, genericFault
) );
}
I tried putting all the fields and then started removing them one by one so as to check whether a particualr field is causing error.
But no luck.
I think problem is something else..
private function updResult(result:Object):void
{
ta.text = 'update Result\n' + ObjectUtil.toString(result);
}
also, you may have to update one or more fields.
which library version do you have?
Message Edited by Ron Hess on 08-23-2007 07:39 AM
Its solved.
I was using wrong Id to update the field.
I was using wrong methods for fetching the errors.
When I corrected that and started getting the error from the API, its then only I fugured that I am using wrong Id.
So, everything is working fine :-)
Thanks!