Hello,
Ri8 nw I'm working on a page named 'Course'. I hv created an action named 'Modify' on page action. I hv declared two primary keys: Type(option) & Course Code(Code). But I can't modify my record by using those fields bcoz they are the part of the composite primary key. So, how can I modify records of those fields? I know that I need to use RENAME() function in the same code.So how would it be like? I wrote The following code:
Modify - OnAction()
RecCourseTable.RESET;
RecCourseTable.INIT;
IF RecCourseTable.FINDFIRST THEN
MESSAGE('record has been found')
ELSE
ERROR('record does not found in the table');
//RecCourseTable."Course Code":="Course Code";
//RecCourseTable.Type:=Type;
RecCourseTable."Course Name":="Course Name";
RecCourseTable.Duration:=Duration;
RecCourseTable.Price:=Price;
RecCourseTable."Passing Rate":="Passing Rate";
RecCourseTable.MODIFY;
MESSAGE('record has been modified successfully');
Thank you,
Ri8 nw I'm working on a page named 'Course'. I hv created an action named 'Modify' on page action. I hv declared two primary keys: Type(option) & Course Code(Code). But I can't modify my record by using those fields bcoz they are the part of the composite primary key. So, how can I modify records of those fields? I know that I need to use RENAME() function in the same code.So how would it be like? I wrote The following code:
Modify - OnAction()
RecCourseTable.RESET;
RecCourseTable.INIT;
IF RecCourseTable.FINDFIRST THEN
MESSAGE('record has been found')
ELSE
ERROR('record does not found in the table');
//RecCourseTable."Course Code":="Course Code";
//RecCourseTable.Type:=Type;
RecCourseTable."Course Name":="Course Name";
RecCourseTable.Duration:=Duration;
RecCourseTable.Price:=Price;
RecCourseTable."Passing Rate":="Passing Rate";
RecCourseTable.MODIFY;
MESSAGE('record has been modified successfully');
Thank you,