Share via


ReasonTableRef::updateCode Method

Updates a new ReasonTableRef row from a supplied reason code value.

Syntax

Note

The syntax of this method varies based on the version of Microsoft Dynamics AX that you are using.

  Microsoft Dynamics AX 2012 R3
          server public static ReasonRefRecID updateCode(ReasonCode _reason, ReasonRefRecID _refRecID)

  Microsoft Dynamics AX 2012 R2 (SYS)
          client server public static ReasonRefRecID updateCode(ReasonCode _reason, ReasonRefRecID _refRecID)

  Microsoft Dynamics AX 2012 Feature Pack (SYS)
          client server public static ReasonRefRecID updateCode(ReasonCode _reason, ReasonRefRecID _refRecID)

  Microsoft Dynamics AX 2012 (FPK)
          client server public static ReasonRefRecID updateCode(ReasonCode _reason, ReasonRefRecID _refRecID)

  Microsoft Dynamics AX 2012 (SYS)
          client server public static ReasonRefRecID updateCode(ReasonCode _reason, ReasonRefRecID _refRecID)

Run On

Server

Parameters

Return Value

Type: ReasonRefRecID Extended Data Type
A non zero ReasonRefRecID identifier if successful; otherwise, zero.

Remarks

It is intended to be used from edit methods on tables that will require a reference to a reason code.

If the update will result in blank code and comment, the related ReasonTableRef row will be deleted and the return value will be set to zero. This will indicate the reference no longer exists.

See Also

Reference

ReasonTableRef Table