当我使用来自 xml 的常规自定义操作时,它具有:
<UrlAction Url="~remoteAppUrl/Pages/Default.aspx?{StandardTokens}&SPListItemId={ItemId}&SPListId={ListId}&SPItemUrl={ItemUrl}" />
并且工作正常,但是当我使用时
Microsoft.SharePoint.Client.UserCustomAction _customAction = web.UserCustomActions.Add();
_customAction.RegistrationType = UserCustomActionRegistrationType.ContentType;
_customAction.RegistrationId = _guidOfCreatedCT;
_customAction.Location = "EditControlBlock";
_customAction.Sequence = 450;
_customAction.Title = "TEST";
string rrr =AppRelativeVirtualPath.ToString();
_customAction.Url = "~remoteAppUrl/Pages/Default.aspx?{StandardTokens}&SPListItemId={ItemId}&SPListId={ListId}&SPItemUrl={ItemUrl}";
_customAction.Update();
clientContext.ExecuteQuery();
这个网址不起作用。我不知道如何格式化这个,我尝试了一切,仍然有任何想法。有人可以帮助我吗?
这是 Sharepoint 2013 的自动托管应用程序。