Giter Club home page Giter Club logo

dynamics365webapiclient's Introduction

Dynamics365 WebAPI Client

Support

  • IFD - ADFS3.0
  • IFD - ADFS4.0
  • On-Premise

Demo Code

 var queryOptions = new QueryOptions(){}
        new QuerySelect("fullname", "modifiedon", "createdon","versionnumber"),
        new QueryCount(true),
        new QueryFilter(new FilterExpression()
        {
            FilterOperator = LogicalOperator.LogicalAnd,
            Conditions =
            {
                new ConditionExpression("@p1", ConditionOperator.Equal, 1),
                new ConditionExpression("@p2", ConditionOperator.Equal, false),
                new ConditionExpression("@p3", ConditionOperator.LessThanOrQqual, DateTime.Now)
            },
            Filters =
            {
                new FilterExpression(LogicalOperator.LogicalOr)
                {
                    Conditions =
                    {
                        new ConditionExpression("@p4", ConditionOperator.Equal, 0),
                        new ConditionExpression("@p5", ConditionOperator.NotEqual, Guid.Parse("381512cc-f1cb-e611-80fb-00155d392b01"))
                    }
                },

            }
        }),
        new QueryParam("@p1", "territorycode"),
        new QueryParam("@p2", "creditonhold"),
        new QueryParam("@p3", "createdon"),
        new QueryParam("@p4", "statecode"),
        new QueryParam("@p5", "_ownerid_value"),
        new QueryParam("@p6", "fullname"));
    Console.WriteLine(queryOptions);
    var crmApiService = new WebApiService();
    //var a = crmApiService.WhoImIAsync().Result;
    //Console.WriteLine(a);
    var a = crmApiService.ReadAsync("contact").Result;
    Console.WriteLine(a);

    var d = crmApiService.ReadAsync("contact", queryOptions).Result;
    Console.WriteLine(d);

    var b = crmApiService.ReadAsync("systemuser", "$select=fullname").Result;
    Console.WriteLine(b);

    var c = crmApiService.ReadAsync("systemuser", "$select=fullname").Result;
    Console.WriteLine(c);

dynamics365webapiclient's People

Contributors

jadynwong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.