Dela via


GrantAccessUsingSharedLinkRequest Class

Definition

Adds a system user to the shared link access team of the target table row.

[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class GrantAccessUsingSharedLinkRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type GrantAccessUsingSharedLinkRequest = class
    inherit OrganizationRequest
Public NotInheritable Class GrantAccessUsingSharedLinkRequest
Inherits OrganizationRequest
Inheritance
GrantAccessUsingSharedLinkRequest
Attributes

Examples

/// <summary>
/// Adds the calling user to the shared link access team of the target table row.
/// </summary>
/// <param name="client">A ServiceClient instance.</param>
/// <param name="entRef">The target table row.</param>
/// <param name="linkId">The shared link ID.</param>
public void GrantAccessUsing_SharedLink(ServiceClient client, 
    EntityReference entRef, Guid linkId)
{
    string recordUrl = @"https://{0}/main.aspx?pagetype=entityrecord&etn={1}&id={2}&shareLink={3}";

    Uri uri = new(String.Format(
        recordUrl, client.ConnectedOrgUriActual.Host,
        entRef.LogicalName, entRef.Id, linkId ));

    GrantAccessUsingSharedLinkRequest request = new()
    { RecordUrlWithSharedLink = uri.ToString() };

    GrantAccessUsingSharedLinkResponse response =
        (GrantAccessUsingSharedLinkResponse)client.Execute(request);
}

Constructors

GrantAccessUsingSharedLinkRequest()

Initializes a new instance of the GrantAccessUsingSharedLinkRequest class.

Properties

ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RecordUrlWithSharedLink

Gets or sets the URL of the table row that has a shared link.

RequestId

Gets or sets the ID of the request. Optional.

(Inherited from OrganizationRequest)
RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)

Applies to

See also