Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Description
Retrieves the list of business objects in Microsoft Dynamics GP that can have a user ID associated with them.
Parameters
Parameter |
Type |
Description |
---|---|---|
context |
Specifies information about how the method will be called. |
Return Value:
Value |
Type |
Description |
---|---|---|
GetUserAssignableBusinessObjectListResult |
A list of the user assignable business objects |
Interfaces
- Dynamics GP
- Common
- Field Service
- Financials
- Human Resources/Payroll
- Inventory
- Manufacturing
- Project Accounting
- Purchasing
- Sales
Examples
The following C# example displays a list of all the available business objects that can have a user ID associated with them.
** Legacy endpoint**
using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using DynamicsGPWebServiceSample.DynamicsGPService; namespace DynamicsGPWebServiceSample { class Program { static void Main(string[] args) { Context context; UserAssignableBusinessObject[] userAssignableBusinessObjects; // Create an instance of the service DynamicsGP wsDynamicsGP = new DynamicsGP(); // Be sure the default credentials are used wsDynamicsGP.UseDefaultCredentials = true; // Create a context with which to call the service context = new Context(); // Set up the context object context.OrganizationKey = null; // Retrieve the list of user-assignable business objects userAssignableBusinessObjects = wsDynamicsGP.GetUserAssignableBusinessObjectList(context); // Display the available object types StringBuilder objectList = new StringBuilder(); foreach (UserAssignableBusinessObject a in userAssignableBusinessObjects) { // Build the string to display objectList.AppendLine(a.BusinessObjectTypeDisplayName); } MessageBox.Show(objectList.ToString()); } } }
** Native endpoint **
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System.Windows.Forms; using DynamicsGPWebServiceSample.DynamicsGPService; namespace DynamicsGPWebServiceSample { class Program { static void Main(string[] args) { Context context; UserAssignableBusinessObject[] userAssignableBusinessObjects; // Create an instance of the service DynamicsGPClient wsDynamicsGP = new DynamicsGPClient(); // Create a context with which to call the service context = new Context(); // Set up the context object context.OrganizationKey = null; // Retrieve the list of user-assignable business objects userAssignableBusinessObjects = wsDynamicsGP.GetUserAssignableBusinessObjectList(context); // Display the available object types StringBuilder objectList = new StringBuilder(); foreach (UserAssignableBusinessObject a in userAssignableBusinessObjects) { // Build the string to display objectList.AppendLine(a.BusinessObjectTypeDisplayName); } MessageBox.Show(objectList.ToString()); // Close the service if(wsDynamicsGP.State != CommunicationState.Faulted) { wsDynamicsGP.Close(); } } } }