Include deleted items from MDOAgent?

lock
push_pin
done
Answered
3

Hi,

is there any way to tell the MDOAgent to also include the deleted entries when retrieving a list?

As an example I need to get all the categories which the user can see, but also include the ones which have been deleted in WebAdmin.

I know you can use "magic" postfixes like "WithNoSelection" on a listname to modify the result, but is there something for Deleted as well?

Frode

10 May 2017 | 12:00 AM

All Replies (3)

Hi Frode,

For Lists:

The additionalInfo parameter is a semi-colon delimited list of name value pairs. If you include showDeleted, it only needs to be included, and not as a key/value pair.

To show deleted, include showDeleted in the additionalInfo parameter. 

If set to showDelete=false, it will still show deleted because, like I stated above, showDelete only needs to be included. Excluding it from the parameter is the showDeleted=false equivalent. 

For MDO:

All MDOProviderBase Lists
    searchValue : performs search "listName like searchValue%" query
additionalInfo :
    showDeleted=True: false by default (only setable on these list providers: heading, SuggestedAppointment, SuggestedDocument, TicketPriority)
    ShowDelete=True: UserGroup list 
    GetDeleted ((only setable on these list providers: ProjectStatus, SaleStage)

 

Hope this helps!

10 May 2017 | 12:00 AM

Hi Tony,

that does sound like exactly what I'm looking for, but when I try it doesn't include the deleted ones.

You mean like this, right?

MDOAgent mdoAgent = new MDOAgent();
var categories = mdoAgent.GetSelectableList("category", false, "showDeleted", false).ToList();
10 May 2017 | 12:00 AM

Hi Frode,

Maybe you read my post before I submitted the edits, but only two MDO's support getting deleted items.

I recommend you try getting the list of categories using the ListAgent instead, and use showDeleted there.

Hope this helps! 

10 May 2017 | 12:00 AM

Add reply