====== GetMessageOid, GetAttachmentOid, GetInterchangeOid, GetDocumentOid ======
The functions **GetMessageOid, GetAttachmentOid, GetInterchangeOid, GetDocumentOid** returns the **Primary-Key-Oid** from the database of the current instance. \\
{{:images:sign_warning.png?nolink|}}**Note:** The functions returns realistic values during message debugging and during job execution. If files are loaded in the mapping Debugger, than there is no message or attachment and therefore the value is a zero GLN ((Behavior can be influenced by the optional parameters.)).
==== Syntax: ====
GetMessageOid([Format], [Debug Value])
GetAttachmentOid([Format], [Debug Value])
GetInterchangeOid([Format], [Debug Value])
GetDocumentOid([Format], [Debug Value])
**Format (optional):** Permissible values are "N", "D", "B", "P", or "X". Default is "N"
^Format ^Formatting of the return value^
|N |32 digits : 00000000000000000000000000000000 |
|D |32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000 |
|B |32 digits separated by a hyphen enclosed in curly brackets: {00000000-0000-0000-0000-000000000000} |
|P |32 digits, separated by a hyphen in brackets: (00000000-0000-0000-0000-000000000000) |
|X |Four hexadecimal values in curly brackets, the fourth value being a subset of eight hexadecimal values, which are also enclosed in brackets:{0 x 00000000, 0 x 0000, 0 x 0000, {0 x 00, 0 x 00, 0 x 00, 0 x 00, 0 x 00, 0 x 00, 0 x 00, 0 x 00}}|
**Debug Value (optional):** A fixed value can be defined here if no document is loaded in the map debugger.
* GetMessageOid()
-> „00000000000000000000000000000000“
* GetAttachmentOid("B")
-> „{00000000-0000-0000-0000-000000000000}“
* GetDocumentOid("B", "Debug Guid")
-> „Debug Guid “
* GetAttachmentOid("B", "Guid.NewGuid()")
-> “{9d83326e-b4c2-4ab8-a358-bf7dc7a7e0d8}”
* GetAttachmentOid("X", "Guid.NewGuid()")
-> “{0xa4e9d36c,0xbbe3,0x45ca,{0x84,0x47,0x40,0xd8,0x0a,0x37,0x79,0x53}}”
{{:images:sign_warning.png?nolink|}}**Note:** The function **Guid. New()** can be used to create a **Guid** for test purposes.