hi Every One
i am New In RTC . my problem is Rename the Primary Keys with RENAME Function. but it is Not Working In RTC.
Error is Occurred in RTC
Error is :The number of field arguments does not match the primary key size.
Please help me.
hi Every One
i am New In RTC . my problem is Rename the Primary Keys with RENAME Function. but it is Not Working In RTC.
Error is Occurred in RTC
Error is :The number of field arguments does not match the primary key size.
Please help me.
Does it really work in classic client?
It sounds as if you try to rename a record that has several fields in the primary key but you only give a few of the values.
For example Table 36 Sales Header has primary key Document type and No. To rename a record in this table you should have the active record in a record variable and then call Rename with values for all fields in primary key.
SH.RENAME(SH.“Document Type”::Order, ‘SO100000’); would rename the active record in variable SH.
Of what i know there should be no difference in this between Classic and RTC (Since code is written for this in C/Side inside Classic Client)
If you still have problem give us the code you have written to rename the record.
/Jinnis
Can you show us the code? and primary key of the table?
i am also having the same problem that mentioned earlier can u please exlain briefly
Check the code as well as check whether you are using all primary key fields during modificaiton
here is my code
where old value is the existance doc no
and new value is the value that is to be rename
SalesInvoiceHeader.RESET;
SalesInvoiceHeader.SETRANGE(SalesInvoiceHeader.“No.”,OldValue_gTxt);
IF SalesInvoiceHeader.FINDFIRST THEN BEGIN
MESSAGE(‘ok’);
SalesInvoiceHeader.“No.” := NewValue_gTxt;
SalesInvoiceHeader.RENAME(SalesInvoiceHeader.“No.”,NewValue_gTxt);
MESSAGE(‘done’);
END;
finally i got the solution i table field is primary key than always use rename instead of modify
SalesInvoiceHeader.RESET;
SalesInvoiceHeader.GET(OldValue_gTxt);
SalesInvoiceHeader.RENAME(NewValue_gTxt);