Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get records by date or latest records not all #111

Closed
Tameem-Ahmad-com opened this issue Jul 30, 2021 · 1 comment
Closed

Get records by date or latest records not all #111

Tameem-Ahmad-com opened this issue Jul 30, 2021 · 1 comment

Comments

@Tameem-Ahmad-com
Copy link

Hi i am using you're package in laravel , i need to get newly created leads , any solution will be helpful, i am getting all records like contacts or leads but unable to filter because of limited documentation on repo

 /**
     * entity set the entity value dynamically
     *
     * @param  mixed $entity
     * @return void
     */
    public function entity($entity)
    {
        $this->entityType = $entity ? $entity : 'lead';
        return $this;
    }

    /**
     * get all entity fields
     *
     * @return void
     */
    public function get()
    {
        $entity = $this->crmClient->retrieveMultipleEntities($this->entityType, $allPages = false, $pagingCookie = null,
        $limitCount = 10, $pageNumber = 1, $simpleMode = false);
        return $entity->Entities??'';
    }
@georged
Copy link
Contributor

georged commented Jul 31, 2021

Hi @Tameem-Ahmad-com

to filter the results you need to use retrieveMultiple method. First parameter is FetchXml query, you can read more about fetchxml expressions in Microsoft documenation. There are 3rd party tools like XrmToolBox that includes FetchXmlBuilder plugin - use these to build and test your expressions.

HTH

@georged georged closed this as completed Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants