is there a way to display a string value in a control (that has a lookup) and save a int64 to the related datafield on a form without using the replacementkey and referencegroup behaviour?

is there a way to display a string value in a control (that has a lookup) and save a int64 to the related datafield on a form without using the replacementkey and referencegroup behaviour?

This question has suggested answer(s)

The problem we have is as follows relating to Dynamics AX 2012 R2:

 

  • We want to do a dynamic lookup on a form grid in one of our fields by overriding the lookup() method.
  • The field is of type Int64 where we want to store the recids of records in multiple other tables and because of that we haven’t set up relations on the table.
  • So on our form we can override the INT64 field’s lookup method and it can find the correct values based on dynamic lookup.
  • The problem is that the recid will now be displayed on the form and we want to be able to display a different String value instead of the recid.
  • We’re aware of the Replacement key behaviour on tables where the form will create a ReferenceGroup control and an automatically created field.

 

Is there a way that we can display a string value in a control (that has a lookup) and save a int64 to the related datafield on a form without using the replacementkey and referencegroup behaviour?

All Replies