2014. szeptember 12., péntek

Show all fields: Property name has max length 40

I spent some time today with the following error:
The user right-clicked an Advance Invoice record, then chose "Record Info", then "Show all fields" and got the tasty error message below:

Property Name has max length 40. An attempt to set it to a string having length 41 has been made.

You would get similar error messages, if you called the same function on the Advance invoice lines, though then it would say length 45.

The solutions: the SysRecordInfo Form on the SYP layer contains a bug.

The problem is with the line marked with red (duh).



The Form's name can be only 40 characters long. The DictTable.name() is "CzCustAdvanceInvoiceTable" (25 chars) + _ShowAllRecords_(15 chars) is too long. Tough luck.

I don't know which KB article dropped the ball on this one, but it's okay in SYS layer, and wrong in SYP layer.

I took the easy way out and simply removed the '_ShowAllRecords_' from the function call, and presto!, it worked.


1 megjegyzés: