-
Notifications
You must be signed in to change notification settings - Fork 42
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
Invalid argument supplied for foreach() Line 103 in Entity.php #98
Comments
Hi @tanberg how are you fetching the records? Can you paste your code? I'm not quite sure what is the problem. Thanks |
$LeadId = '08644B69-XXXX-XXXX-A965-005056BB3D77';
|
Hi @tanberg what's the value for Thanks |
Even if I just do |
What version of php do you have? |
PHP Version 7.2.4 |
and the Dynamics 365/ CRM version? |
9 |
Hmmm, it looks like attributes is not initialised correctly. Maybe there is something coming from the metadata that breaks our code. Can you capture the logs (you'd need to plug your own log provider)? @wizardist, any ideas what's going on here? |
i will do my best to get a logger in place and post back as fast as I can. |
Unfortunately server log just gives me the same stack trace back to Entity 103 |
Not the server log, toolkit log that you can initialise when creating an org service instance
|
@tanberg I wonder if you have the right permissions on CRM, e.g. reading metadata... What is the role of the user you're using to connect? |
@tanberg |
Account is set up as Administrator, changed to 'lead' and still having the same issues. |
We also have a ticket in with the CRM provider and he has this link to follow the issue as well. |
Any other ideas @georged ?? |
@tanberg We need the logs or you need to step through in debug to see what's coming back in the metadata and why attributes are not properly initialized. Thanks |
This was using the cli-whoami.php essentially. I'm guessing that we have permission issues going on here. ERROR TYPE: E_EXCEPTION --------------------------------------------------------------------------- PHP STACK TRACE --------------------------------------------------------------------------- |
@tanberg looks like it's a permission issue. Can you double-check what role does your user account have in Dynamics 365? |
When trying to simply fetch a record, I am running into this error that occurs during the creation construction of the Entity on line 103.
When I look at the Organization.svc, I can find the Entity ('Lead') type that I am looking for, but as far as a list of attributes, I see no values.
Could this be an error on the part of whoever setup the server that this feature is not available to the web?
Thanks in advance.
The text was updated successfully, but these errors were encountered: