9

After copying /sitecore/system/Field types/List Types/Multilist from List Type to the /sitecore/system/Field types/User Defined and renaming, I went over to Master, updated the template to the newly copied Multilist field type. It still did not work, only showing a basic textbox, no error on screen or in the logs. That then led me to check the /sitecore/...


8

Yes it will. There are no field types that ship out of the box, that gives you that functionality. If you are going to explore making your own customisation for this, I would suggest the Multilist with Search field is a good place to start. A good place to start could be: Have a Field Day With Custom Sitecore Fields


6

So one thing to note - CriticalError - the user is warned before saving, but the data is still saved. FatalError will stop the item from being saved if validation fails. But... What you are trying to do is not possible in a validator. The this.GetItem() method in the base validator, gets the item from the database. Remember that a validator works on a ...


5

I have faced the same issue during the implementation of Display custom facet on the Experience profile tab. @x3mxray helped me as well to implement the same. As per the article http://zhenyuan.azurewebsites.net/post/displaying-custom-facets-in-contact-profile you followed, the controller will return your facets values, but it's not serialized so you will ...


4

I think this is now included out of the box with WFFM, no need for custom save action: Navigate to /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Send Email Message item. In Parameters field add the following: <IsIncludeAttachments>true</IsIncludeAttachments> Save and publish changes. I have it working on ...


3

Your issue is that each facet has an XObject object on it that contains a lot of circular references. The XObject will never serialize, you just need to tell NewtonSoft to ignore it when serializing. You can do this with a DefaultContractResolver. You can see this working in my repo. https://github.com/buildabonfire/Bonfire.Analytics.Dto Your facets will ...


3

Here's my solution: I am using 3.7.1 version of the Sitecore.XA.Foundation.TokenResolution.dll so there is no service for token resolution but a static class. Then for getting current item it was really easy actually... Just add a property in my custom field. Use those if Sitecore.XA.Foundation.TokenResolution is 3.8.0 or above using Sitecore....


3

Inject ITokenResolver and call Resolve() method. ITokenResolver tokenResolver = ServiceLocator.ServiceProvider.GetService<ITokenResolver>() string query = tokenResolver.Resolve(MY_QUERY, CONTEXT_ITEM); and then for example: CONTEXT_ITEM.Axes.SelectItems(query) You can, of course, use construction injection instead of using ServiceLocator for ...


3

You could perhaps do this by injecting some custom JavaScript into content editor like so with a pipeline: Pipeline var page = HttpContext.Current.Handler as Page;   foreach (string script in _scripts) {     page.Header.Controls.Add(         new LiteralControl(             "<script type='text/javascript' language='javascript' src='{0}'></script&...


3

I found the answer on StackOverflow: https://stackoverflow.com/questions/33301106/query-lucene-index-against-ienumerable-field In short, instead of using IEnumerable<DateTime> Checkins you can use [IgnoreIndexFieldAttribute] DateTime Checkins And then you can search using i.Checkins >= request.DateFrom Checkins property will not show ...


3

I used a variation of Balaji's answer to search for data templates that contain a particular field type (in this case "link"), rather than for content with the field type. This also pops up the results in SPE's nice data grid for printing as HTML or exporting to a spreadsheet. Get-ChildItem -Path "/sitecore/templates" -Recurse | Where-Object {$_.Fields["{...


3

As field types are not linked with item's ID you cannot use Link Database for that. PowerShell You could iterate through all fields in PowerShell and find those with particular field type SQL Open SQL Management studio Execute something like that SELECT TOP 1000 [ItemId] ,[FieldId] ,[Value] ,[Created] ,[Updated] FROM [...


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

I've used the Inline Item List field in the past: https://marketplace.sitecore.net/en/Modules/Inline_Item_List_Field.aspx. It provides extra buttons to create items from the Multilist field so that you don't have to leave the item you are editing. It hasn't been updated in a while so I can't speak to it's compatibility in Sitecore 8+.


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....


2

I can't give you a complete solution but I can guide you a bit to along the right path. You'll need a custom field type for this. Credit here goes to jammykam Who wrote a nice blog article about creating a key/value data field with lookup: https://jammykam.wordpress.com/2015/03/08/custom-sitecore-field-for-storing-keyvalue-data-with-lookups/ I've already ...


2

I think you are talking about custom field type. Looks like you are talking about something that cannot be done with standard field types thus you will have to create your own custom field type for that How to create custom field type Implement your custom field namespace Sitecore.Playground.Fields.FieldTypes { public class CustomField : Edit { ...


2

I think the most flexible solution is to use the iframe field type, because it allows you to easily implement your own frontend and backend implementation. In the past I did something like this, but here is the main idea how you can achieve this. In Sitecore you need to use the iframe field type: To make this path work I need to map this route: using ...


2

I don't believe it's possible to customize this dialog without changing the xml and classes associated with it. You may however like using Sitecore PowerShell Extensions. Get-User -Filter "sitecore\*" | Show-ListView -Property Name,@{label="Email";expression={$_.Profile.Email}}


2

My answer is incorrect. See Richard's answer below. Answer is "use fatal validation result instead of critical". Or use item:saving event like described in my answer. You can use workflow and not allow to proceed to the final state if any of the validators failed. Alternatively, you can use item:saving event instead of validation. Another way is using ...


2

On https://ggullentops.blogspot.be/2016/05/sitecore-wffm-mvc-fileuploadfield.html I have a solution for a custom field that can check filesize and type. Without copying the whole code, it comes down to creating a validation attribute(s) that inherit from DynamicValidationBase and override ValidateFieldValue. Next you create the custom field: inherit from ...


2

You need to make sure that you have created your control and is present in the website/sitecore/shell or website/sitecore modules/. Moreover, the namespace used in the code should match the one in the control, i.e, the xaml/xml file.


2

Just set a display name of your button to whatever you want to be a tooltip:


2

You're rendering the HTML markup directly in your cshtml file, but you need to use the Html Helpers. I suggest you take a look at the default Checkbox field markup located in /Website/Views/Form/EditorTemplates/CheckboxField.cshtml, your markup is almost exactly the same as the default view: @using Sitecore.WFFM.Abstractions.Data.Enums @using Sitecore.Forms....


2

I have managed to create a solution for that. Please find code below: public class EnumCheckList : Checklist { public string Source { get; set; } protected override void OnLoad(EventArgs e) { if (Sitecore.Context.ClientPage.IsEvent) { ReadCheckedItemsFromRequest(); } else { if (...


1

For this purpose, I would use the iframe field type, which is IMO the most flexible solution for custom field types. You can find more information about the iframe field type here: Cascading Droplist field in Sitecore https://trnktms.com/2017/04/06/sitecore-iframe-field-basics/ The advantege is that you have the full control of the presentation and stored ...


1

It seems that you try to return Sitecore.XConnect.Facet in server response to browser. Facet is a complex model with generic self-referenced properties. Try to create a simple class for view model only with fields that you need on client side, populate them from facet and use it for server response instead of Facet model. I have also faced this issue when ...


1

My initial answer here assumed that Sitecore would actually use the order in the array resulting from MultilistEx's GetItems method, but that would have been too simple. I tested it just after answering and found that it didn't work. So I had to fix my errors. What you want to do (and probably have done) is override Sitecore MultilistEx. This has the method ...


1

What is throwing you off, is the ambiguous labeling of method GetItem(). Here's what it looks like: protected virtual Item GetItem() { if (this.itemUri == (ItemUri) null) return (Item) null; Item obj = Database.GetItem(this.itemUri); if (obj == null || obj.Versions.Count == 0) return (Item) null; this.UpdateItem(obj); return obj; } The ...


1

If you have powershell extension, you can try Get-ChildItem -Path "/sitecore/content" -Recurse | Where-Object {$_.Fields["{AB162CC0-DC80-4ABF-8871-998EE5D7BA32}"] -like "Text"} 'Text' is a field type name


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