Copy Attachment From one Record to another in x++
private void copyAttachments(RecId _copyFromRecid,TableId _copyFromTableId, RecId _copyToRecid,TableId _copyToTableId)
{
DocuRef copyfromDocuRef;
DocuRef ProjTableDocuRef;
//Search if exists an attachment
while select copyfromDocuRef
where copyfromDocuRef.RefTableId == _copyFromTableId
&& copyfromDocuRef.RefRecId == _copyFromRecid
{
//Copy attachment
DocuRef::createFromDocuRef(copyfromDocuRef,_copyToRecid , _copyToTableId);
}
}
Regards
Muhammad Farraz
email: farazjaved01@gmail.com
Comments
Post a Comment