Allows you to change Tag information, such as the Tag Title, Tag Type, Start Date and End Date.
Namespace: Microsoft.Tag.CampaignManagementAssembly: Microsoft.Tag.CampaignManagement (in Microsoft.Tag.CampaignManagement.dll) Version: 1.0.7785.0 (1.0.7785.0)
Syntax
| C# |
|---|
bool UpdateTag( UserCredential userCredential, string categoryName, string existingTagName, Tag tag ) |
| Visual Basic |
|---|
Function UpdateTag ( _ userCredential As UserCredential, _ categoryName As String, _ existingTagName As String, _ tag As Tag _ ) As Boolean |
| Visual C++ |
|---|
bool UpdateTag( UserCredential^ userCredential, String^ categoryName, String^ existingTagName, Tag^ tag ) |
Parameters
- userCredential
- Type: Microsoft.Tag.CampaignManagement..::..UserCredential
A 64-bit encrypted GUID specifying the user credential.
- categoryName
- Type: System..::..String
The name of the Category containing the Tag to be updated.
- existingTagName
- Type: System..::..String
The current name of the Tag to be updated.
- tag
- Type: Microsoft.Tag.CampaignManagement..::..Tag
The new Tag object containing the information that will update the Tag.
Return Value
true if the method succeeds
false if the method fails
Remarks
UpdateTag allows you to change a Tag's Name, Start and End dates, Type, and Type-specific information, such as URL or telephone number.
UpdateTag fails when any of the following invalid parameters is passed:
- Category not found.
- Category is paused.
- Tag not found.
- Tag is paused.
- Updated Tag has dates that lie outside the bounds of the containing Category's dates.
- Updated Tag has conflicting dates (e.g. the Start Date is after the End Date).
Examples
This code sample demonstrates how to call UpdateTag(UserCredential, String, String, Tag).
CopyC#
private void LocalUpdateTag() { try { MIBPContractClient OMIBPClient = new MIBPContractClient(); UserCredential oCredential = new UserCredential(); oCredential.AccessToken = "Enter your access token"; VCardTag = new VCardTag(); vTag.Title = "New Tag Title"; vTag.UTCStartDate = new DateTime(yyyy, mm, dd); OMIBPClient.UpdateTag(oCredential, "Category name", "Existing Tag Title", vTag); } catch { throw; } }