Hello ,
I need to do a COC on method Class/CustVendOutPaym/dialogAddPrintDocument
In this method will create dialog fields and I have two radiobutton fields called Payment Advise and Use print management…
I need to make these two fields by default yes, but when I use COC and add below code
it is making them yes but it is also creating two more xtra controls beacuse in COC two fields and by standard logic another two
Below is the code used on COC, please suggest how to make these two runtime fields default yes
[ExtensionOf(classStr(CustVendOutPaym))]
final class FLTNA_PrintPaym_Extension
{
protected void dialogAddPrintDocument(PaymDocumentType _documentType,
DialogRunbase _dialog,
boolean _addPrintOption,
boolean _makePrintGroup,
boolean _usePrintMgmt)
{
next dialogAddPrintDocument(_documentType,
_dialog,
_addPrintOption,
_makePrintGroup ,
_usePrintMgmt);
VendParameters vendParameters;
DialogField dialogPrintPaymAdvice;
DialogField dialogPrintPaymAdvicePrintMgmt;
NoYes PaymadviseValue;
select * from vendParameters where VendParameters.DataAreaId == curExt();
if (vendParameters.UsePrintMgmtDefault)
{
switch (_documentType)
{
case PaymDocumentType::PaymAdvice:
dialogPrintPaymAdvice = _dialog.addFieldValue(enumStr(NoYes), printPaymAdvice, "@SYS55191", "@SYS78930");
if (_usePrintMgmt)
{
dialogPrintPaymAdvicePrintMgmt = _dialog.addFieldValue(enumStr(NoYes), printPaymAdvicePrintMgmt, "@SYS70782", "@SYS70782");
if (dialogPrintPaymAdvice.value() == NoYes::No)
{
dialogPrintPaymAdvicePrintMgmt.enabled(false);
}
}
break;
}
}
}
}