<< Click to Display Table of Contents >> Navigation: Developers' Guide > Accessing UDT and UDFs |
Navigation: Developers' Guide >
Accessing UDT and UDFs
This topic describes how to access User Defined Fields (UDFs) using iVend Add-On Framework.
There are following two approaches to access the user-defined fields:
To retrieve all records and access the user-defined field value of the first record:
DataTable dtAllUDTRows = AppExtensibilityContext.GetAllUDTRows("U_SampleUDT");
string Id = dtAllUDTRows.Rows[0]["U_Id"].ToString();
To retrieve specific record based on the primary key and access the user-defined field value of the retrieved record:
UDTRow m_UDTRow = AppExtensibilityContext.GetUDTRow("U_SampleUDT", m_SampleUDTKey);
string Id = m_UDTRow["U_Id"].ToString();
Note
Refer to the How to Create UDT and UDFs topic to learn more.