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

Fix SOQL Date field as label #25

Merged
merged 3 commits into from
Nov 6, 2020
Merged

Fix SOQL Date field as label #25

merged 3 commits into from
Nov 6, 2020

Conversation

scolladon
Copy link
Collaborator

Description

Use the built in String concatenation implicit conversion mechanism to fix the different type casting for label in the soql query.
Works with String, date, datetime and number

Motivation and Context

fix #24

How Has This Been Tested?

Unit test scratch org
Jest test
Apex unit test
Deployment test in scratch org

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Works with String, date, datetime and number
@scolladon
Copy link
Collaborator Author

Clever !

Unfortunately it does not work because the AggregateResult.get return an Object
image

victorgz
victorgz previously approved these changes Nov 6, 2020
@scolladon scolladon merged commit acfbec8 into master Nov 6, 2020
@victorgz victorgz deleted the fix/soql-date-label branch November 17, 2020 19:08
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

Successfully merging this pull request may close these issues.

Date Field Issue: Invalid conversion from runtime type Date to String
2 participants