title: How to force the Plugin on Post-Operation to Submit?
body: <p>I have a plugin in post-operation witch need to create a folder on sharepoint via webservice, to do that, my plugin calls a webservice to execute a FechXML to get the info from the entity, but the problem is that entity still not exist, and it give me Null.</p>
  
  <p>How do i force the plugin to submit/save the data to my FechXml to work?</p>
  
  <p>PLUGIN CODE:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>try
      {
          Entity entity;
          if (context.InputParameters.Contains("Target") &amp;&amp; context.InputParameters["Target"] is Entity)
          {
              entity = (Entity)context.InputParameters["Target"];
              if (entity.LogicalName != "fcg_processos")
              {
  
                  throw new InvalidPluginExecutionException("Ocorreu um erro no PlugIn Create Folder.");
              }
          }
          else
          {
  
              throw new InvalidPluginExecutionException("Ocorreu um erro no PlugIn Create Folder.");
          }
  
          processosid = (Guid)((Entity)context.InputParameters["Target"])["fcg_processosid"];
          string processoid2 = processosid.ToString();
  
  
          PluginSharepointProcessos.ServiceReference.PrxActivityResult result = log.CreateFolderSP("Processo", processoid2);
  
          string resultado = result.xmlContent;
  
          if (result.retCode &gt; 0)
          {
              throw new InvalidPluginExecutionException("Ocorreu um erro na criação do Folder do Processo.");
  
          }
  </code></pre>
  
  <p>WEBSERVICE CODE:</p>
  
  <pre class="lang-cs prettyprint-override"><code> {          
              //WEBSERVICE TO CALL XML FROM ENTITY
              PrxActivityResult Processo = ProcessoFetch2("", "", guid);
              string stxml;
              stxml = Processo.XmlContent;
              XmlDocument xmlDoc = new XmlDocument();
              xmlDoc.LoadXml(stxml);
              XmlNodeList nodeList = xmlDoc.SelectNodes("resultset/result");
              List&lt;string[]&gt; lista = new List&lt;string[]&gt;();
              string[] strs = new string[7];
              if (nodeList.Count != 0)//verificar o numero de registos
              {
  
                  foreach (XmlNode xmlnode in nodeList)
                  {
                      if (xmlnode.SelectSingleNode("//fcg_numero") != null)
                          strs[2] = xmlnode.SelectSingleNode("//fcg_numero").InnerText;
                      else
                          strs[2] = "";
  
                      if (xmlnode.SelectSingleNode("//Concurso.fcg_numero") != null)
                          strs[3] = xmlnode.SelectSingleNode("//Concurso.fcg_numero").InnerText;
                      else
                          strs[3] = "";
                  }
  
              }
  
          IwsspClient FmwSharepoint = new IwsspClient();
          PrxActivityResult folderresult = new PrxActivityResult();
  
          List&lt;ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave&gt; arrayfields = new List&lt;ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave&gt;();
  
          ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave nprocesso = new ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave();
          nprocesso.Key = "FCG_Numero_Processo";
          nprocesso.value = strs[2];
          arrayfields.Add(nprocesso);
  
          ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave npconcurso = new ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave();
          npconcurso.Key = "FCG_Numero_Concurso";
          npconcurso.value = strs[3];
          arrayfields.Add(npconcurso);
  
          ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave npguid = new ws.fcg.sipp.svc.ServiceReferenceSharePoint.PareChave();
          npguid.Key = "FCG_Guid_CRM";
          npguid.value = guid;
          arrayfields.Add(npguid);
  
          folderresult = FmwSharepoint.CreateFolder("http://localhost/folder", "Processos", strs[2], arrayfields.ToArray());
  
          res = folderresult;
          }
  </code></pre>