When opening a base form [eg Customer] I am reading a related table which identifies whether there is a custom table/form for that particular type of Customer. If so I have a Command button that becomes visible and when Pushed I want to call the particular custom form.
If I create 'tmpRec' of type Record but do not assign a specific Subtype, the form will not compile. I was hoping that some simple code like the following might work. RecRef.SETTABLE does not seem to be very valuable if you cannot have a dynamically assigned Record variable. I was insuring that all custom forms would link on the Customer No.
IF CustomTableNo <> 0 THEN BEGIN
RecRef.OPEN(CustomTableNo);
RecRef.SETTABLE(tmpRec);
TmpRec.SETRANGE("Customer No.","No.");
FORM.RUN(CustomFormNo,tmpRec);
END;
Any thoughts appreciated - thanks
PS - The reason for wanting to do this dynamically is that we have several clients that would benefit from the custom form idea
0
Comments