Monday, December 28, 2015

Comparing insert and insert_recordset

Comparing insert and  insert_recordset 

insert()


static void prodinsert(Args _args)
{
 EcoResProduct                           ecoResProduct;
 EcoResProductIdentifier                 ecoResProductIdentifier;
 
 ttsBegin;
 while select ecoResProduct
      
  {
   ecoResProductIdentifier.Product = ecoResProduct.RecId;
   ecoResProductIdentifier.ProductNumber = ecoResProduct.DisplayProductNumber;
   ecoResProductIdentifier.insert();
    }
     ttsCommit;
    

}
insert_recordset()
static void Ecoresprodinsert(Args _args)
{ 
EcoResProduct ecoResProduct; 
EcoResProductIdentifier ecoResProductIdentifier; ;  
insert_recordset ecoResProductIdentifier(Product,ProductNumber)
select RecId,DisplayProductNumber from ecoResProduct;  
{  
info(strFmt("%1",ecoResProductIdentifier.ProductNumber)); }
}

by using joins
https://msdn.microsoft.com/en-us/library/aa635694.aspx

No comments:

Post a Comment

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...