
Hi
How can i use crossCompany from update_recordset? I want to update my temptable record with custTrans table
My temptable, I already inserted records using crosscompany.
Relation
MyTempTabel.voucher == custTrans.voucher
I nead to update MyTempTabel.invoiceid=custTrans.Invoice
both tables I need to get all crosscompany records. I used the following script but I am getting blank
ttsBegin;
while select crossCompany custTrans
{
changecompany(custTrans.dataAreaId)
{
TmpTaxTransactionRDP = null;
select forUpdate TmpTaxTransactionRDP
where TmpTaxTransactionRDP.voucher == custTrans.Voucher;
if (TmpTaxTransactionRDP)
{
TmpTaxTransactionRDP.SourceInvoiceNo=custTrans.Invoice;
TmpTaxTransactionRDP.update();
}
}
}
ttsCommit;
Thanks & Regards
Avinash Moosa
*This post is locked for comments
I have the same question (0)Hi Avinash Moosa ,
If TmpTaxTransactionRDP has "savedatapercompany" property = "No" then you can use next script:
ttsBegin;
while select crossCompany custTrans
{
select forUpdate TmpTaxTransactionRDP
where TmpTaxTransactionRDP.voucher == custTrans.Voucher;
if (TmpTaxTransactionRDP)
{
TmpTaxTransactionRDP.SourceInvoiceNo=custTrans.Invoice;
TmpTaxTransactionRDP.update();
}
}
ttsCommit;