10

As far as I remember, Sitecore 8 support for Sheer has been dropped in favour of SPEAK. Here you can find more information on how to convert a button from Sheer to SPEAK. In essence you have to use JavaScript for that and create a function according to the template below: define(["sitecore"], function (Sitecore) { Sitecore.Commands.YourCommandName = { ...


7

Because Sitecore does not provide you the hooks to validate the transaction you're after, your best bet is to hide the security features and manage them in code. Here's a few suggestions that aren't too onerous to implement. Prerequisite: Lock Sitecore Users out of Security Features Make sure no one has access to Sitecore Client Securing Make sure no one ...


6

You need to remove the parameters from the method declaration. It should be protected void OnSortChange() You should then be able to access the sender by the ID used on the form. You many need to define the control in the codebehind if you have not already: protected Sitecore.Web.UI.HtmlControls.Combobox Target


4

I have decompile the Sitecore Code and below is an example how the popup appeared: This screenshot is from the Sitecore.Shell.Applications.Dialogs.Upload namespace So, you can make use of the Context.ClientPage.ClientResponse.Alert("Specify at least one file to upload."); The code can take up to 3 parameters. You can specify the response and the header. ...


4

Its a sheer UI functionality that usually used if you are building new custom field and you want that field to have its own edit interface in Page editor, or you want to extend one of default sitecore fields. For example let say you want to add custom button next to "Single Text Line" field in page editor, that simply clears the content of your field. This ...


4

After hours of investigating the issue, I found the problem that I am supposed to send the load command using ClientResponse instead of SendMessage. Thanks, everyone for your help. string load = $"item:load(id={workflowItem.ID},language={workflowItem.Language},version={workflowItem.Version})"; Context.ClientPage.ClientResponse.Timer(load, 2);


3

You should have a method which check the status of the task. Please see below: protected void CheckStatus() { var isJobDone = JobManager.GetJobs().FirstOrDefault(j => j.Name.Equals("Push To API") && j.Status.State == JobState.Running); if (isJobDone != null && !isJobDone.IsDone) { SheerResponse.Timer("CheckStatus", ...


3

"Magic" ;-) Declare a public property; public string ItemID { get; set;}. Sitecore will populate this property by Reflection. You can then do normal .GetItem() operations. Caveat If multiple fields are currently being edited on the item in the Content Editor and those changes have not been saved yet - you won't see them. Reference: https://stackoverflow....


3

Please have a look at my answer to this question: How do I display an error dialog from content editor command? As far as I remember in Sitecore 8 support for Sheer has been droped in favour of Speak.


2

To address this issue I had to change the dialog OnOk method. Instead of calling the SetDialogValue I called the following: //writes the url and link name(dialogValue .Value). This will build the link on the Rich Text Editor SheerResponse.Eval("scClose(" + StringUtil.EscapeJavascriptString(dialogValue.Url) + "," + StringUtil.EscapeJavascriptString(...


2

try: Context.ClientPage.ClientResponse.Alert("Your error message");


2

The approach to sheerUi seems fine. As an alternative to blocking the save outright and as you say possibly loosing other changes made, you could strip the user-account specific permissions from the inMemoryItem and let the rest go through. var accessRules = itemInMemory.Security.GetAccessRules(); foreach (var accessRule in accessRules) { if (accessRule....


2

I have figured out what was the issue. Brief Problem Description I have been using the same code as the one for the Sitecore Installation Wizard upload UI. The only modification done in the implementation is that instead of reading the the ASPXpage, I have created an item which is mapped onto the ASPX page and also, it should allowed only CSV file to be ...


2

The issue is with the method declaration. You need to change it to the one below: protected void OnSortChanged() { //Retrieve the selected value var targetValue = this.Target.SelectedItem.Value //Do stuff } All the different actions do not take any parameters. Even if it is a Click, DblClick. They will not take any parameters ...


2

Using the "Magic" Mark mentioned it works. However, to get the ItemId and the Source into the dialog, use the last answer as described in this article: https://stackoverflow.com/questions/8148279/how-to-get-a-reference-to-the-currently-edited-item-when-inside-a-custom-field-i. The full class looks now like this: using Sitecore.Diagnostics; using Sitecore....


1

The problem is, you can't extend from the WorkboxForm class you need to use the complete decompiled code, because you need to change the private function GetStateItems and GetItems private AdvancedWorkboxForm.StateItems GetStateItems(WorkflowState state, IWorkflow workflow) { Assert.ArgumentNotNull((object)state, nameof(state)); ...


1

You can add a DialogWindow component on your app's presentation details. In your javascript add a function to open the dialog window. openUploadDialog: function () { this.UploadDialog.show(); }, Then, you can call this function with a button or other trigger.


1

The root cause of the problem was that the Download method was not either finding the file or having permissions to run the download. The file itself was not being saved within the Website folder but on another folder within the server(this prevented the download from working). I noticed that and changed the ExportToExcel method to start saving the file ...


1

Instead of using the SheerResponse.Download, you can make use of the following code: Context.ClientPage.ClientResponse.Download(file.FullName); This is also used in the Download Package and it is meant for downloading files. Note: I haven't tested the code. Just make sure that the file path is correct.


1

You have to provide more information, are you creating your own dialog, or you want to change existing dialog functionality, if so you have to change inheritance of existing dialog aspfx file, so it points to your own code functionality. For instance for fileUpload <%@ Page language="c#" CodeBehind="Upload.aspx.cs" AutoEventWireup="false" Inherits="...


Only top voted, non community-wiki answers of a minimum length are eligible