// Create the retrieve target.
TargetRetrieveDynamic targetRetrieve = new TargetRetrieveDynamic();
// Set the properties of the target.
targetRetrieve.EntityName = EntityName.appointment.ToString();
targetRetrieve.EntityId = EntityID;
// Create the request object.
RetrieveRequest retrieve = new RetrieveRequest();
// Set the properties of the request object.
retrieve.Target = targetRetrieve;
// Create a column set that holds the names of the columns to be retrieved.
ColumnSet colsToGetAppointment = new ColumnSet();
colsToGetAppointment.AddColumn("subject");
colsToGetAppointment.AddColumn("scheduledstart");
colsToGetAppointment.AddColumn("regardingobjectid");
retrieve.ColumnSet = colsToGetAppointment;
// Indicate that the BusinessEntity should be retrieved as a DynamicEntity.
retrieve.ReturnDynamicEntities = true;
// Execute the request.
RetrieveResponse retrieved = (RetrieveResponse)serviceSdk.Execute(retrieve);
// Extract the DynamicEntity from the request.
appointmentDyn = (DynamicEntity)retrieved.BusinessEntity;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment