// Set up the connection to the Dynamics CRM server. $crm = new DynamicsCRM(); // Use the retrieve_entity_info function to get the metadata of the "account" entity. $entityMetadata = $crm->retrieve_entity_info("account"); // Print out the names of the attributes of the "account" entity. foreach ($entityMetadata->Attributes as $attribute) { echo $attribute->LogicalName . "
"; }
// Set up the connection to the Dynamics CRM server. $crm = new DynamicsCRM(); // Use the retrieve_entity_info function to get the metadata of the "account" entity. $entityMetadata = $crm->retrieve_entity_info("account"); // Print out the names of the relationships of the "account" entity. foreach ($entityMetadata->ManyToOneRelationships as $relationship) { echo $relationship->SchemaName . "
"; }
// Set up the connection to the Dynamics CRM server. $crm = new DynamicsCRM(); // Use the retrieve_entity_info function to get the metadata of the "account" entity. $entityMetadata = $crm->retrieve_entity_info("account"); // Print out the names of the security roles that can access the "account" entity. foreach ($entityMetadata->Privileges as $privilege) { echo $privilege->PrivilegeName . "In this example, we use the retrieve_entity_info function to get the metadata of the "account" entity. We then loop through the privileges of the entity and print out the names of the security roles that can access the entity. The package library that provides the retrieve_entity_info function is Microsoft Dynamics CRM Web API.
"; }