codemann8
codemann8

Reputation: 390

Stack Trace Error for RefTableId field assignment

I created a new table and added a new Integer field (called RefTableId) with an EDT of the standard RefTableId type. Writing NewTable.RefTableId = tableNum(SomeTable); compiles but during run time I get this stack trace error: "Error executing code: Wrong argument types in variable assignment."

I've even tried NewTable.RefTableId = 0; This still fails. And yes, I've triple checked that it is indeed an integer field.

Upvotes: 0

Views: 110

Answers (2)

codemann8
codemann8

Reputation: 390

The solution is really stupid, the line before the assignments was reading .data() out of a FormListItem object that had invalid data in it. Instead of showing an error for that line, it skips over it and fails the assignment lines below. It makes no sense to me since I wasn't using any information from that FormListItem object to populate any field data with, yet still caused that to fail for some reason. I'm going to mark this one in the "Bang Head Here" category.

Upvotes: 1

Jan B. Kjeldsen
Jan B. Kjeldsen

Reputation: 18051

If the code is in a class, be sure to do a compile of all super classes as well as a compile forward (child classes). Remember to do an incremental CIL.

If it still fails do a full compile (axbuild).

Upvotes: 0

Related Questions