+ Start a Discussion
Geetha ReddyGeetha Reddy 

Issue on S-Object

Hi all,

 

public void addRecord(){
String OBJ_NAME = objectName;
sObject dynObject= Schema.getGlobalDescribe().get(OBJ_NAME).newSObject() ;
dynObject.put('Sales_Order__c' , parentFieldId) ;
for(sObject obje : ssc.getRecords()){

upsert obje;

}

insert dynObject;

ssc = null;
getRecords();
}

 

I am getting error as :

 

Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Sales Order: id value of incorrect type: a09Q0000006SpTmIAK: [Sales_Order__c] 

 

Can any help on this issue..