[Extensionof(tableStr(SubBillScheduleLine))]
internal final class DaxSubBillScheduleLine_Extension
{
public void recreateMilestoneSubItems(SubBillMilestoneAllocationHeader _milestoneAllocationHeader)
{
SubBillScheduleLine milestoneSubLine;
SubBillMilestoneAllocationLine allocationLine;
while select allocationLine
where allocationLine.SubBillSchedLineRecId == _milestoneAllocationHeader.SubBillSchedLineRecId
{
select forupdate milestoneSubLine
where milestoneSubLine.RecId == allocationLine.SubBillSchedLineRecId;
ttsbegin;
milestoneSubLine.DaxEnum = DaxEnum::Advanced; //custom field
milestoneSubLine.update();
ttscommit;
}
next recreateMilestoneSubItems(_milestoneAllocationHeader);
}
public void insert()
{
SubBillScheduleLine milestoneSubLine;
select milestoneSubLine
where milestoneSubLine.SubBillMilestoneHeaderRecId == this.SubBillMilestoneHeaderRecId;
this.DaxStatus = milestoneSubLine.DaxStatus; //custom field
next insert();
}
}
..............
Subsription billing > All Billing Schedules
Create a header and line and click on Milestone Allocation.