HI I try to use a switch case in microsoft dynamics nav.
I have this:
CASE Betalingswijze OF
'kontant':
TemplateHeader.Code :='KNT-KLANT';
'rekening':
TemplateHeader.Code :='REK-KLANT';
'automatische incasso':
TemplateHeader.Code :='BIN-INC-KL';
ELSE
TemplateHeader.Code :='KONTANT';
END;
and this:
RecRef.GETTABLE("<Customer>");
//connect the payment method to the TemplateHeader and update the record:
//rekening
TemplateHeader.SETFILTER(TableID, FORMAT(18));
IF Betalingswijze := 'kontant' THEN
TemplateHeader.SETFILTER(TemplateHeader.Code,'REK-KLANT' );
UpdateRecordTemplate.UpdateRecord(TemplateHeader, RecRef);
//kontant
TemplateHeader.SETFILTER(TableID, FORMAT(18));
TemplateHeader.SETFILTER(TemplateHeader.Code,'KNT-KLANT' );
UpdateRecordTemplate.UpdateRecord(TemplateHeader, RecRef);
//automatische incasso
TemplateHeader.SETFILTER(TableID, FORMAT(18));
TemplateHeader.SETRANGE(TemplateHeader.Code,'BIN-INC-KL' );
UpdateRecordTemplate.UpdateRecord(TemplateHeader, RecRef);
But now all the tree options are selected an not one.
So how to manage that only one selection will be selected?
Thank you