Domanda

Sto modificando il modello di avviso per quando viene assegnata una voce di attività.

Questa sezione qui

<HTML>
  <![CDATA[<td class="toolbarbutton"><a href="]]>
</HTML>
<GetVar Name="ItemUrl" URLEncodeAsURL="TRUE" />
<HTML><![CDATA[">$Resources:Alerts_link_view; ]]></HTML>
<GetVar Name="ItemName" HTMLEncode="TRUE" />
<HTML>
  <![CDATA[</a></td><td class="toolbarsep">|</td>]]>
</HTML>
.

Rendering nell'e-mail come

<td class="toolbarbutton">
  <a href="http://localhost/test/Lists/Tasks/Dispform.aspx?ID=1">View Task One</a>
</td>
<td class="toolbarsep">|</td>
.

C'è comunque in caml in modo che l'href va invece a

.

../ Elenchi / Attività / EditForm .aspx? ID= 1

Fondamentalmente, voglio manipolare il valore proveniente da
<GetVar Name="ItemUrl" URLEncodeAsURL="TRUE" />

È stato utile?

Soluzione

Piuttosto che "manipolare" il var 'Itemurl', che non penso sia possibile, puoi costruire il tuo proprio URL.Basato su quanto sopra, credo che tu voglia qualcosa del genere:

<HTML>
  <![CDATA[<td class="toolbarbutton"><a href="]]>
</HTML>
<GetVar Name="ListUrl" URLEncodeAsURL="TRUE" />
<HTML><![CDATA[/EditForm.aspx?ID=]]></HTML>
<GetVar Name="RawValue#ID" />
<HTML><![CDATA[">]]></HTML>
<GetVar Name="ItemName" HTMLEncode="TRUE" />
<HTML>
  <![CDATA[</a></td><td class="toolbarsep">|</td>]]>
</HTML>
.

Per garantire che il valore dell'ID arrivi attraverso, è possibile anche rimuovere "ID" dagli elementi & all'interno della sezione Template Alert .

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top