У меня метод один:
X++:
/// <summary>
/// This method is used to specify conditions on total number of hours while setting up the configuration for timesheet line workflow.
/// </summary>
/// <param name="_companyId">
/// Present Company Id supplied by framework.
/// </param>
/// <param name="_tableId">
/// Table Id supplied by framework.
/// </param>
/// <param name="_recId">
/// Record Id of the timesheetline for which total number of hours is required.
/// </param>
/// <returns>
/// Total number of hours in the timesheet line.
/// </returns>
public TSHoursTotal parmTotalWeekHours(
CompanyId _companyId,
TableId _tableId,
RecId _recId)
{
TSHoursTotal tsHoursTotal;
TSTimesheetLine tsTimesheetLine = TSTimesheetLine::findRecId(_recId);
if (tsTimesheetLine.RecId != 0)
{
tsHoursTotal = tsTimesheetLine.totalWeekHours();
}
else
{
throw error(strFmt("@SYS113080", _recId, tableId2name(_tableId)));
}
return tsHoursTotal;
}