I have created a multivalue field in a dialog and it looks like this when I initially open the dialog:
Is there any way to have it display the field(s) necessary to create the first option when the dialog first opens? This is how we want it to look:
I have looked through the documentation and I could not find a way to accomplish this, but I thought I would ask before telling the designers 'no.'
Thanks for your help!
You need to customize multivalue field to achieve it.
Create your own field factory by extending info.magnolia.ui.form.field.factory.MultiValueFieldFactory<D> in extended factory override createFieldComponent() and once field is initialized (e.g. by calling super.createFieldComponent()) you can add the first option you wanted programatically.
You might have to also tweak transformer or saving of the field to not save empty option if it doesn't do that already ootb.
Related
I've got a simple repeater that list links to uploaded documents using cms.file. I'm drawing a blank on adjust the ORDER BY based on publish date. I can't find anything here on this, so i apologize if this is a duplicate.
Best practice is to add custom field to page type (in this case cms.file or better create the new one) and set ORDER BY condition to this new field. There are also properties like DocumentModifiedWhen, DocumentCreatedWhen, DocumentCheckedOutWhen you can use.
I'm going to use DocumentModifiedWhen as the ORDER By statement.
There are two fields [DocumentPublishTo] and [DocumentPublishFrom] that you can think of using. These are the two fields which appear at the bottom of each form page by default.
We have a dialog inheriting MvxDialogViewController containing two Sections - TheRadios and TheList.
In response to the user changing the radio within TheRadios, we repopulate TheList (in the view model).
How can we bind a Section of a MvxDialogViewController to a dynamic list?
Looking through all the mvvmcross samples I couldn't find an example of this being done. I considered inserting a MvxActionBasedTableViewSource into the relevant Section's TableView but the property is null.
If you do want to bind a list within a Dialog section to a list, then I believe this extension may help you - https://github.com/asednev/MvvmCross.AlexeysExtensions
I'm afraid it is for vNext rather than v3 currently, but I think it should port very easily - I think the only changes needed would be just a few namespace changes (if you do port it, then please send them a pull request with the changes)
Alternatively
it is open source, so it may give you alternative ideas
you could consider using a custom or manual binding to INotifyPropertyChanged in order to achieve the table changes you are looking to achieve
I am new to CRM, and I have run into a requirement where I have to show some controls (textbox, option set, etc) and custom entities (sub - grid) as readonly. But, when I made them readonly, they appears like disabled and are getting grayed out. Is there any way to make them only read only not look like disabled?
Please suggest.
Thanks,
Ashfaq.
in CRM read-only means fields are greyed out but still they are readable.
If you want to make the fields visible as normal but don't want them to be editable by the user, you need to write JavaScipt for that.
Take the following steps.
1. Make the fields editable.
2. On form's OnSave Event, call the following method to prevent the attributes to be saved.
function PreventSave()
{
Xrm.Page.getAttribute(“CRMFieldName”).setSubmitMode(“never”);
}
It will not grey out the fields and still prevent the user to change their values.
I hope it will help you.
For text fields, there is one type of text field that when set to readonly does not look like it is disabled. Off the top of my head I can't remember which type. For the other field types I have not found a way to not have them look disabled when made readonly.
Other option is not to use form fields but show the data you need to be readonly (and not grayed out) in a web resource (HTML/SL/etc). Be aware tho that if your users are using outlook with crm addin, there are limitations here when the record is viewed in the outlook reading pane.
Only other option I can think of is to not set the fields as readonly but control any field data changes with javascript.
In short, I haven't found a good way to do what you need.
I have a subgrid on a form, I want to show different value which is calculated base on another field on the form.
I don't want to save to database, just for display purpose, is it possible to set the value use javascript?
I'm afraid the answer to this is no.
There's no concept of 'calculated fields' in MSCRM, I found this a disappointment when I switched to MSCRM from SalesLogix which does support display-only calculated fields.
The only way you could possibly do this without data changes would be hacking the DOM of the grid control, but this is very much unsupported and could get really, really complicated.
If you're willing to concede to make schematic changes, you could add a new field to the entity, and use a workflow process to update the field on save of the entity. Then just add this field to your grid.
You may create a chart with custom calculation on it.
If interested, ask me to know what I mean.
I've got a requirement to hold a DateTime value in a SharePoint field but to customise the display in a list view so that it shows as a mmmm string. The underlying value must remain as the DateTime so the sort is chronological rather than alphabetical.
So I think that a Custom Field is the way to go, I'll also get some added benefit in restricting the user interface to a month picker so even if there is another solution I'll likely go down this route to get that.
I've read that I can apply custom templates to the new, edit and display actions but I can't seem to find anything saying how to alter the list view (display patterns doesn't seem to be enough).
Anyone got any ideas?
Thanks
Justin
I dont know if this is what you are looking for but I have used a solution with a custom fieldcontrol that overrides RenderFieldForDisplay like:
protected override void RenderFieldForDisplay(HtmlTextWriter output)
This is a similar post:
How to manage column based access control in Sharepoint lists?
Ended up using a bit of an ugly series of <IfSubString> within the RenderPattern...