Skip to content
This repository was archived by the owner on Jan 29, 2022. It is now read-only.

Labels do not support ToString() #3

Closed
AMSoftwareNL opened this issue Nov 9, 2017 · 1 comment
Closed

Labels do not support ToString() #3

AMSoftwareNL opened this issue Nov 9, 2017 · 1 comment
Assignees
Labels

Comments

@AMSoftwareNL
Copy link
Owner

Steps to reproduce

Get-CrmEntity |? { $_.DisplayName.ToString() -eq 'Organisatie' }

Expected behavior

Expected list of entities where DisplayName (in current language) is 'Organisatie'.

Actual behavior

Get the following error:
Exception calling "ToString" with "0" argument(s): "Method invocation failed because [AMSoftware.Crm.PowerShell.Common.
Converters.LabelConverter] does not contain a method named 'ConvertToString'."
At line:1 char:20

  • Get-CrmEntity |? { $_.DisplayName.ToString() -eq 'Organisatie' }
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : ScriptMethodRuntimeException

Environment data

Version: v1.3.0.0
Connected to Dynamics 365 CRM Online

@AMSoftwareNL AMSoftwareNL self-assigned this Nov 9, 2017
@AMSoftwareNL
Copy link
Owner Author

Removed the code which caused the error. Compare on string will not work on labels.

AMSoftwareNL added a commit that referenced this issue Feb 15, 2018
GitHub issue #3 and #4 solved, and added async option to Import-CrmSolution
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant