Hi all,
I have a four status and in the HRMCoursetable i wrote a jumpref.
filter according to the HRMCourseTable Description.
and i have a custom form and custom menu item only one.
below my code once set menu item properties "parameter"
Ex: register its working now, how i can set remaining status i have an one menuitem only.
below my code.
[ExtensionOf(tableStr(HRMCourseTable))]
final class HRMCourseTableSDS_Extension
{
static void peformJumpRef(HrmCourseId _CourseId)
{
HRMCourseTable coursetable;
HRMCourseAttendee courseAttendee;
MenuFunction menuFunction;
Args args = new Args();
if (_CourseId)
{
coursetable = HRMCourseTable::find(_CourseId);
//courseAttendee = HRMCourseAttendee::find(_CourseId, coursetable.CourseInstructor);
select firstonly courseAttendee
where courseAttendee.hrmCourseId == coursetable.hrmCourseId;
}
args.record(coursetable);
args.lookupRecord(coursetable);
if(coursetable.status == HrmCourseTableStatus::Open)
{
args.parm('Open');
}
else if(courseAttendee.status == HrmCourseAttendeeStatus::Registered)
{
args.parm('Registered');
}
else if(courseAttendee.status == HrmCourseAttendeeStatus::DropOut)
{
args.parm('RegistrationCanceled');
}
else if(courseAttendee.status == HrmCourseAttendeeStatus::WaitingList)
{
args.parm('WaitingList');
}
else if(courseAttendee.status == HrmCourseAttendeeStatus::Confirmation)
{
args.parm('Confirmation');
}
menuFunction = new MenuFunction(menuitemDisplayStr(SDSOpenCourseListPage), MenuItemType::Display);
menuFunction.run(args);
}
}
and i mapped above method in my custom form description,
public class SDSMyConfirmedCourses extends FormRun
{
[DataSource]
class HRMCourseTable
{
[DataField]
class description
{
///
///
///
public void jumpRef()
{
//super();
HRMCourseTable::peformJumpRef(HRMCourseTable.hrmCourseId);
}
}
}
Thanks