I want to get all memberships with start date between '2016-01-01' and '2016-06-01' using crmApi(). Here's my code that's not working:

  angular.module('angularmemberships').config(function($routeProvider) {
  $routeProvider.when('/memberships', {
    controller: 'AngularmembershipsMembershipsCtrl',
    templateUrl: '~/angularmemberships/MembershipsCtrl.html',

    resolve: {
      memberships: function(crmApi) {
        return crmApi('Membership', 'get', {
          sequential: true,
          rowCount: 100,
          start_date: ['2016-01-01', '2016-06-01'],
          sort: 'start_date DESC',

If I specify single date (start_date: '2016-01-01') it works (returns rows fot that date), but how do I get rows for a date range?


Oh, I've found in my crm menu Support - Develper - API Explorer and there was a solution:

start_date: {'BETWEEN': ['2015-01-01', '2016-01-01']},
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.