I want to insert in Accounts Receivable-> Settings -> Accounts Receivable Parameters (in form CustParameters
) a new group with a new parameter field in the dialog of function Update quotation line.
When button Update Quotation Line is clicked, it opens a dialog.
I inserted a new field, I modified method getFieldDescripion
in class SalesQuotationToLineField
.
This works, I have the new parameter, but I do not have a Group .
I want a group with a label like in the following screenshot, but with my label (field-Label). What do I have to change to achieve this?
Thanks all!
enjoy!
If I understand your question correctly, you added a new field to the dialog "Update sales quotation line" that can be called from form CustParameters
and now you want to change the label of the group of this new field.
To do this, you have to overwrite method fieldGroupLabel
of class SalesQuotationToLineField
and add a switch
similar to method getFieldDescription
to test for the new field and return a custom label in that case. This overwritten method will be called by method dialog
in class SalesPurchTableToLineParametersForm
.
The overwritten fieldGroupLabel
should look similar to the following example:
public FieldLabel fieldGroupLabel()
{
FieldLabel ret;
ret = super();
switch (this.parmFieldId())
{
case fieldNum(SalesQuotationTable, SalesGroup): // replace this with the new field
ret = 'My Group label'; // replace this with the id of the label you want to use
break;
}
return ret;
}