You need to sign in to do that
Don't have an account?
Maxplore
Creating custom object records and setting custom fields from Flex
I am trying to create a record in Custom object "RMA_Shipment_Order" and trying to set a custom field "Case" which is a lookup field pointing to Case object.
If I dont set the custom field while calling the "create" method, then the record gets created in the custom object. But if I set the custom field, then I dont get any error but at the same time record also doesnt get created. Here is the code cnippet of what I am doiing.
// Appending "__c" since its a custom object
var acc:SObject = new SObject('RMA_Shipment_Order__c');
// Appending "__c" since its a custom field. Please note that I am setting a valid Case number which exists
acc.Case__c = "0010023";
apex.create([acc], new AsyncResponder(
function (result:Object):void {
ta.text += 'createResult\n' + ObjectUtil.toString(result);
}, genericFault
) );
apex.create([acc], new AsyncResponder(
function (result:Object):void {
ta.text += 'createResult\n' + ObjectUtil.toString(result);
}, genericFault
) );
Can anyone please respond to this?
Thanks for letting me know.
We will be putting a popup control from where user will be selecting the case number. I guess when we are populating the case number using the SOQL query, at that point of time, we will fetch the ID of the case numbers also and pass both the case number and ID to the main form and then can use the create method for creating the record in custom object.
Can you validate this approach or do you have some better idea?