I am trying to get all the fields of the selected rows on clicking of a ribbon button. So far I'm getting these values when I use SelectedControlSelectedItemReferences crm parameter on custom JS action: Id (Guid), TypeCode, TypeName (Schema Name of entity) and Name.
How can I get all the fields of the selected row?
You will only get Id (Guid), TypeCode, TypeName (Schema Name of entity) and Name. from the Grid Row. blog for reference
You will have to retrieve(webapi) specific fields using guid and schema name.
Related
When a user opens the view "Items Available To Work on" for QueueItem entity, a related entity's column is showing some data in the view. I want to remove or hide that data when another column in the view has some specific data in it.
Here is the actual example which I need to achieve.
When the field "Case Type" has text "Revenue Collection" then hide text "Dummy Taxpayer" from the field "Taxpayer". Both fields are showing from related entity Case in this QueueItem view.
I have checked the following possibilities but these are not working.
1- RetrieveMultiple message cannot be used with the QueueItem entity.
2- Tried with entity "SavedQuery" on RetrieveMultiple, but that is giving FetchXML of the view. We cannot change the result of the FetchXML dynamically here also.
3- In the properties of the column "Taxpayer" in the view, we do not have the option to run a JavaScript as my CRM version is 2016. This feature is available in Dynamics 365.
So, there is no supported way to achieve this as per my understanding. Any help/suggestion is appreciated on this issue
In Grid,
You cannot Hide/show column dynamically depending on your condition. Rather you can enable/disable field so that users cannot edit field based on Condition.
Please find Link Article as Example.
This is more of a data captured problem rather than data hide/show problem.
When the case type is "Revenue Collection", the value of the "Tax payer" should be null. Then this problem is solved in grid/view or form and everywhere.
In my queue view, I have a global option set which is against a incident entity.
When I include it in my view, it appends the column name with a suffix "(object)".
This is happening for other option sets as well. Is there a way to remove this suffix?
Unfortunately this is product limitation. The view column names cannot be renamed, it will load from display name of attributes and for associated entity attributes extra text will be appended within () either entity name or object.
This could be an enhancement like discussed here.
You can only change column titles by unsupported means. To do so, you would do the following:
Open the view editor, select any column and choose 'Change Properties'
Add a new Web Resource .js file containing basic jQuery code to select the relevant column header and change its text
Set the Function Name in the column properties window equal to the function created in your .js file
Example code based on your scenario:
function changeColumnText() {
$(document).ready(function () {
$("label:contains('Source')").text('Source');
});
}
Forgive my ignorance for the proper terminology, but let me try to explain what I want to happen.
I have two custom fields on the incident table/form. I have created a custom table with 2 columns. I have figured out how to reference the table in one of the fields, allowing me to search the entries. Now I want to link the field selection to the other field via the custom table I made. When I make a selection in field A, I want field B to populate with the other column on the same row Field A pulled from in the first place. How would I do that?
Sounds like you want what's commonly referred to as a "derived field" or a dot-walked field.
You have a reference field which stores the reference to the other table, and want a second field on the form that shows another field on that referenced table. You don't actually need to create a new element, you just need to add a dot-walked form element.
Once you have the reference field added, go to Personalize/Configure the form layout.
In the slushbucket of available fields, you'll notice that reference
fields show up in green text with a little [+] next to them.
Select your reference field and a little button will show up between the two
lists, just above the "Add" button
Click that button and the left-side available fields will show the fields available on that reference field's table.
From here, select that second field that you want to display on your form, and bring it over to the right side where you want it.
Here is the scenario:
I have a kendo combobox and it is working as it should for adding records. It will look up records from it's data source as the user types, and assign the ID of the selected record to the FK field in the record being edited. I have paging in the datasource set to 30 records and this works nicely.
Now when I edit a record, the FK ID is bound to the combobox and it then looks up the record so it can display the text for it. Perfect. However if the record bound to the combobox has an ID that is not in the first page of data returned by the comboboxs auto-complete datasource, it just shows the FK ID instead of the text for the record in the combobox widget UI.
How can I get the combobox to look up the record by ID to display the text for it on, when loading an edit form?
Or is there a better solution? Can I somehow bind the text to the combobox for records being edited if I include it in the load record data?
Thank you for your time,
Regards,
Scott
I have a model that contains a collection property as List(). In my view, each of the ChildModel objects is rendered in a table row via it's own Editor Template.
On postback, my model gets bound correcty in that contains a list of ChildModels with the correct about of items originally created in the view, but all the properties of the ChildModel are null, with the exception of the single Editable field.
Based upon this, it appears as if it is creating an entirely new collection of objects, and forgetting all about any values set previously.
I've tried adding the other child object properties to hidden fields, but I still get default values (nulls or zeros) for all properties accept for the one I have created an edit control for. (textbox).
Any thoughts on how to get at a minimum a key field for my item so I can simply update my existing collection?
I found that my hidden field value is in the Request.Form on postback with the Quantity values as well as the values I put in the Hidden fields. I'm not sure why the FormValueProvider isn't parsing those values.