public static string GetItems(RestCommand command, ReferenceType refType, int refID, bool orderByDateCreated = false)
        {
            ActionLogsView items = new ActionLogsView(command.LoginUser);

            if (orderByDateCreated)
            {
                items.LoadByReference(refID, refType, "DateCreated DESC");
            }
            else
            {
                items.LoadByReference(refID, refType);
            }
            return(items.GetXml("History", "ActionItem", true, command.Filters));
        }
        public static string GetActionLogsView(RestCommand command)
        {
            ActionLogsView actionLogsView = new ActionLogsView(command.LoginUser);

            actionLogsView.LoadByOrganizationID(command.Organization.OrganizationID);

            if (command.Format == RestFormat.XML)
            {
                return(actionLogsView.GetXml("ActionLogsView", "ActionLogsViewItem", true, command.Filters));
            }
            else
            {
                throw new RestException(HttpStatusCode.BadRequest, "Invalid data format");
            }
        }