TrvExpGuest::insertNewGuest Method
Creates a new guest and the link to an expense line.
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
client server public static void insertNewGuest(
RefRecId _expenseLine,
TrvExpGuestId _name,
Name _company,
TrvGuestTitle _title,
TrvGuestGiftAmount _amount,
[TrvGuestType _type,
TrvHcmWorkerRecId _creatingWorker])
Microsoft Dynamics AX 2012 R2 (SYS)
client server public static void insertNewGuest(
RefRecId _expenseLine,
TrvExpGuestId _name,
Name _company,
TrvGuestTitle _title,
TrvGuestGiftAmount _amount,
[TrvGuestType _type])
Run On
Called
Parameters
- _expenseLine
Type: RefRecId Extended Data Type
A TrvExpTrans record to which this guest record applies.
- _name
Type: TrvExpGuestId Extended Data Type
The name of the new guest.
- _company
Type: Name Extended Data Type
The company of the new guest.
- _title
Type: TrvGuestTitle Extended Data Type
The title of new guest.
- _amount
Type: TrvGuestGiftAmount Extended Data Type
The amount of new guest.
- _type
Type: TrvGuestType Enumeration
The internal user.
- _creatingWorker
Type: TrvHcmWorkerRecId Extended Data Type
Remarks
This method makes sure not to create a duplicate row by comparing name, title, and company to rows already existing for this expense line. As long as no matching guest row is found, this method creates the guest and the link back to the expense line.