Friday, July 27, 2018

WebApi - Enable to CORS - cross domain - get Json format

WebApiConfig.cs under App_Start

using System.Net.Http.Headers;
using System.Web.Http;
using System.Web.Http.Cors; 


// Web API configuration and services
            var cors = new EnableCorsAttribute("*", "*", "*");
            config.EnableCors(cors);


config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

//This will get JSOn format
            config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));

List View Filter - Show only Today's Or Less than 7days items


If you want to filter only items that are less than 7 days old then you just use
Filter
  • Created
  • is greater than or equal to
  • [Today]-7
Note - the screenshot is incorrect.
New items - created in last 7 days


🤖 📄 How to Create a Document-insight Agent in Microsoft 365 Copilot

📚Microsoft 365 Copilot enables you to build custom agents that interact with users, retrieve knowledge from organizational data, and answer...