J'essaye de mettre à jour un email existant avec une nouvelle propriété mais je ne peux pas l'obtenir fonctionnant .. je la teste en ajoutant une propriété faite sur commande avec une chaîne d'horodatage dedans ..EWS SetExtendedProperty question
Quand je vais chercher l'élément après ce qui a cours, je ne vois pas de propriétés étendues sur du tout ...
Voilà comment je suis en train de l'enregistrer:
message.Load();
Guid MyPropertySetId = new Guid("{117c7745-5df5-4049-97be-8e2d2d92d566}");
ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(MyPropertySetId, "JNB", MapiPropertyType.String);
message.SetExtendedProperty(extendedPropertyDefinition, DateTime.Now.AddDays(2).ToString());
message.Update(ConflictResolutionMode.AlwaysOverwrite);
Et puis quand je le tire à nouveau je le fais:
if (item.ExtendedProperties.Count > 0)
{
// Display the name and value of the extended property.
foreach (ExtendedProperty extendedProperty in item.ExtendedProperties)
{
if (extendedProperty.PropertyDefinition.Name == "ccpUniqueID")
{
messageAlreadyLogged = AccountMessageManager.HasMessageAlreadyBeenSaved(extendedProperty.Value.ToString());
}
}
}
Il est tout simplement pas de propriétés étendues ....
Toute similitude avec cette solution S/O? http://stackoverflow.com/questions/3304157/error-when-i-try-to-read-update-the-body-of-a-task-via-ews-managed-api-you-m – tgolisch