Comparing insert and insert_recordset
insert()
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