-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Aleksey
Further to my PR and previous issue #150...
Having a separate byKeyUrl would be useful. The case you gave as achieving this result actually does not work in the case which necessitated me implementing this function.
The most common case I have for this is to do with users. I have several methods that return a subset of the user base. For example OrderApprovalUsers which is a subset of Users returned by users/GetOrderApprovalUsers.
When an Order is raised, the current list of approved users is returned for the selectbox, a user is selected e.g. user id 99. Lets say later that user leaves the business, or their authority is revoked - they are no longer returned by the users/GetOrderApprovalUsers controller method. As a result, no call to users/GetOrderApprovalUsers with userid:99 will ever return a value.
This means whenever I display this record, the ApprovedBy field is blank - even though I have data to complete it.
If however a separate byKeyUrl such as I have implemented can be specified, then the selectbox can call users/GetUserById?UserId=99 without impacting any other functionality. By default, the ByKey method uses the LoadUrl anyway, so all that is required is an additional property ByKeyUrl that is only actually used if it is specified. It is a very small change with a very powerful additional functionality.
Would you please reconsider?