I'm trying to validate array field in modifiedField method of the
table. The problem is that i don't know how to catch modifications of
one of the array values, not the whole array field.
<code>
public void modifiedField(fieldId _fieldId)
{
int i;
;
super(_fieldId);
switch (_fieldId)
{
case fieldnum(CustInvoiceLine, Dimension): //this catches
modifications of whole field, but this line is never executed when you
modify one of the values of the array
...
}
</code>
Any ideas?
Regards
arnam
Regards
you have to use the fieldId2Ext() method.
An example:
case(fieldId2Ext(
fieldnum(CustInvoiceLine, Dimension),
Dimensions::code2ArrayIdx(SysDimension::Department))):
--
Best regards,
Martin Drab (Czech Blog: http://dax-cz.blogspot.com)
Hi,
You can try to implement/workAround with the following code in
modified field to achieve the expected result.
static void FindDimensionArrayName(Args _args)
{
sysDictField sysDictField;
int _array;
;
sysDictField = new sysDictField(tablenum(SalesTable),
fieldnum(SalesTable, Dimension));
for (_array = 1; _array <= sysDictField.arraySize(); _array++)
{
info(strfmt("Dimension value is %2: %1",
sysDictField.label(_array), sysDictField.name(DbBackend::Sql, _array,
FieldNameGenerationMode::FieldList, tablestr(SalesTable))));
}
}
In case any other queries please feel to revert back.
Thanks
Santosh.R
Try this:
case fieldid2ext(fieldnum(CustInvoiceLine,Dimension),2):
info("Hi");
break;
Hope it helps!!!
Regards,
Anitha
On Feb 9, 1:16 pm, arnam <arn...@gmail.com> wrote:
Yours sincerely,
arnam