mardi 27 janvier 2015

How to get value in item adding on a remote event receiver for a taxonomy field?



I have the following code which returns me a value like this:



"1;#empresa1|6507d102-8c2c-4072-b8bc-c4c67636e091"



The value I am interested in its: empresa1


Is there anyway I can get it in an item adding event on a remote event receiver without string manipulation??



public static SPRemoteEventResult CreateClientSiteAndUpdateSiteOnList(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
try
{
using (ClientContext clientContext = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
{
if (clientContext != null)
{
var afterProperties = properties.ItemEventProperties.AfterProperties;
afterProperties["Nombre_x0020_Cliente"].ToString()







0 commentaires:

Enregistrer un commentaire