Need a little help querying custom modules
The below code was auto generated by Sitefinity. How do I iterate through each object in myCollection?
The below code was auto generated by Sitefinity. I added 2 parameters to the function, one for the Username the other a password. Note that they are Guid's, not strings. How do I modify the code below to filter by username & password?
Anybody know why the filter is being ignored in the following code snipped? All of the orders are being bound to the Grdiview, not just the one with the matching Username. Username is a custom field of type Guid that was added to the module.
Is it possible to filter a module by a custom field? I tried it a different way but still no success. Again, it's returning all orders.
Use a foreach to loop over items (type DynamicContent) your myCollection object.
Regarding the ignored filter, here are a couple things to try:
You might be getting back duplicates as I discovered. Sitefinity keeps multiple copies of each in their various states. See more about it in this thread.
This is the code I have been using to filter custom Dynamica module fields.