Controling Edit, Delete on individual items - asp.net-dynamic-data

Is there a way to enale/disable the edit and delete on individual entity instances using a propery on the entity when displaying in the List control?

H Marius, I have a security sample that uses routing to do this sort of thing, what is it exactly you are trying to do achive?

Related

Adding multiple entities to one main form

I am in the process of modifying forms to account for V9 of Dynamics which is being rolled out currently.
Our environment is using Dialogs but these are being deprecated with V9 which means we have to prepare the forms to be used instead of these Dialogs.
Due to how fragmented our solution is the data is all over the place in different entities and can all be written too at different times.
Is it possible to have multiple entities/records on the same form which are all editable? This way I can run rules to hide and show as people edit specific fields.
From what I can identify, there is no "true" way to achieve this. However, if there are entities which are linked via a relationship within the solution, it is possible to add the "Party List" type field to the form and this will act as the link between the two entities. When you go to search for an existing record within the related entity, there is a new button which allows you too create a new record of that entity which directly associated with the form you were working on initially.
We do have editable subgrids. Add the subgrids of related entities & allow users to edit the related records in main record form at one shot.

Handling Relational Data Input

When creating an MVC application with a "Create" view for a particular entity and I want to relate it to another entity I could use a dynamic drop down menu.
However when the possible items is larger than 10 (for example) the drop down does not seem to offer the best user experience.
What is the recommended way to handle the input of a relationship between entities? A textbox that validates against the possible entities?
A textbox that validates against the possible entities?
That is pretty much the answer. The general idea would be to have a controller method that takes a query string and checks against the list of valid entities and returns the entities that match the query. The user can then choose from that filtered list.
You don't have to build it from scratch if you don't want to. Take a look at something like https://github.com/twitter/typeahead.js. There is also https://select2.github.io. However, there are probably lots of choices for that type of control.

Sorting data in work with pattern in genexus according to a particular attribute

How to sort data in work with pattern in genexus according to a particular attribute? please give me the code segment for putting in load event.
In the pattern object, right-button click in the object you want to edit, Add > Orders, and then create a new order with the desired attribute.

CRM 2011 - How to update Marketing List Member Type options to reflect entity display name changes?

Is there a way of updating the Option Set options for the Marketing List Member Type to reflect an entity display name change? i.e. if the account entity has been renamed to organisation, is there a supported way of reflecting this in the displayed options? I have been able to achieve this using javascript, but wondered if there was a better way of achieving this? At the moment I am unable to change the descriptions of the current options: Account, Contact or Lead.
Simple solution..
Create a Solution in your crm org. Add Marketing list to it.
Export the translations from the solution and when you open the translation excel file you will see all 3 picklist values.
from there you can change the values.
If you have to rename an existing entity, you should also rename its 'messages'.
You will find them in the customization area. Open the entity account. There you will find 'messages'. These are the strings which are used for the entity.
For a complete renaming, you have to replace the term 'account' in these messages.
It's just a normal Option Set on the Marketing List entity called "createdfromcode" which has three options (Account, Contact, Lead) and the underlying values match the entity type codes (1,2,4).
You can't edit this option set directly, but you could set up your own with appropriate values and the labels you want to use, add that option set to the form and use javascript to copy the selected value into the existing field (which you keep on the form but not visible).

MS CRM 4 - Custom entity with "regardingobjectid" functionality

I've made a custom entity that will work as an data modification audit (any entity modified will trigger creating an instance of this entity). So far I have the plugin working fine (tracking old and new versions of properties changed).
I'd like to also keep track of what entity this is related to. At first I added a N:1 from DataHistory to Task (eg.) and I can indeed link back to the original task (via a "new_tasksid" attribute I added to DataHistory).
The problem is every entity I want to log will need a separate attribute id (and an additional entry in the form!)
Looking at how phone, task, etc utilize a "regardingobjectid", this is what I should do. Unfortunately, when I try to add a "dataobjectid" and map it to eg Task and PhoneCall, it complains (on the second save), that the reference needs to be unique. How does the CRM get around this and can I emulate it?
You could create your generic "dataobjectid" field, but make it a text field and store the guid of the object there. You would lose the native grids for looking at the audit records, and you wouldn't be able to join these entities through advanced find, fetch or query expressions, but if that's not important, then you can whip up an ASPX page that displays the audit logs for that record in whatever format you choose and avoid making new relationships for every entity you want to audit.
CRM has a special lookup type that can lookup to many entity types. That functionality isn't available to us customizers, unfortunately. Your best bet is to add each relationship that could be regarding and hide the lookups that aren't in use for this particular entity.

Resources