Hi there folks! I have a problem. Today i've created a batch class with two parameters:
- From Date
On ax it look like this
Is there any possibilities that the "Date" label could be change to:
"From date" and "To date"?
I have already tried with adding :
to each parameter but it didn't work out. Do u have any ideas?
Thanks for help!!
Use the right EDTs - FromDate and ToDate.
Yep, i already did that, then compile class and did full CIL compilation aaaand nothing happened :/
I'm pretty sure you won't have this problem if you create a new report. The problem must be caused by the fact that you created your report with wrong EDTs and the old labels are still used somewhere.
Open the report, go to Parameters node and check the Prompt String property of your parameters. If you see new labels there, then the old values come from a cache.
let's try this dialog.addField( extendedTypeStr(TransDate), 'From Date' );
This would create an additional field, which is not what we want here. Also, your new field isn't bound to anything, therefore setting the value would make no difference in the batch. Also, if you use hard-coded text, the caption wouldn't change in other languages. If you had a case when using addField() make sense, it's still the best option to use an EDT with right label. In your code, you use a wrong EDT (TransDate instead of FromDate) and then you're trying to compensate this problem by explicitly providing a label.