You need to sign in to do that
Don't have an account?
Raghu_dev
Missing entity type information. sObject requires separate 'type' field be sent
Hi, I have a problem creating(actually cloning) attachment from a s-control. I search all the community tags/threads and there was none which can help me identify the issue. Idea is, s-control creates a copy of attachment and attach it to a specific account. But this s-control is giving an error as stated on my message subject. Please help me if someone out there has the problem solution. Here is the code
Thanks
Raghu
Code:
function moveAttachments() { var desc = sforce.connection.describeSObject("Attachment");
var qfields = desc.toUpdateFieldNames(); var attrelList = sforce.connection.query("Select Id, " + qfields + " from Attachment where ParentId = '"+ curProsId + "' limit 1"); //delete attrelList.Id; attrelList.ParentId = masterSFDCId; //attrelList.ParentType = "Account"; attrelList.Id = null; attrelList.ContentType = "txt"; attrelList.Name = "Test" var cloneAtt = sforce.connection.create([attrelList]); }
Thanks
Raghu