I'm changing my code to below format
public void init()
{
super();
ttsbegin;
insert_recordset taxRegistrationTmp(ValidTo, Name,AccountNum )
select ValidTo from taxRegistration
join taxRegistrationTypeApplicabilityRule
where taxRegistration.TaxRegistrationTypeApplicabilityRule == taxRegistrationTypeApplicabilityRule.RecId
join taxRegistrationType
where taxRegistrationTypeApplicabilityRule.TaxRegistrationType == taxRegistrationType.RecId
// && taxRegistrationType.RecId == _regTypeRecId
join dirPartyLocation
where taxRegistration.DirPartyLocation == dirPartyLocation.RecId
&& dirPartyLocation.IsPrimary == NoYes::Yes
join Name from dirPartyTable
where dirPartyLocation.Party == dirPartyTable.RecId
join AccountNum from custTable
where custTable.Party == dirPartyTable.RecId;
// && custTable.AccountNum == custAccount;
if(taxRegistrationType.ApntTaxRegistrationType == ApntTaxRegistrationType::TRN)
{
taxRegistrationTmp.RegistrationNumberTRN = taxRegistration.RegistrationNumber;
taxRegistrationTmp.insert();
}
if(taxRegistrationType.ApntTaxRegistrationType == ApntTaxRegistrationType::TRL)
{
taxRegistrationTmp.RegistrationNumberTRL = taxRegistration.RegistrationNumber;
taxRegistrationTmp.insert();
}
ttscommit;
}
But I'm not getting values.