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

custom query new 255 character limit? #47

Closed
Mike-Cleaver-LB opened this issue Nov 25, 2024 · 6 comments
Closed

custom query new 255 character limit? #47

Mike-Cleaver-LB opened this issue Nov 25, 2024 · 6 comments

Comments

@Mike-Cleaver-LB
Copy link
Contributor

After updating the component properly (as per the quip) I tried to reinsert my matching query and got the error that it is longer than 255 characters. This query hasn't changed but now is not valid. Was there a change to the inputs here as I didn't think the length mattered? or was the query breaking before?

@jlowe-SFDC
Copy link
Collaborator

@Mike-Cleaver-LB - looks like this is an issue with the new Custom Property Editors. The property panel uses the "lightning__textType". Snippet from the development docs here:

image

It seems a limit is enforced by the product with CPE's whereas there was no limit before with the standard property editor. The 255 character limit you are experiencing is more than the docs indicate though. I'll need to see if I can revert this back to a standard editor but it'll take some time and will likely need to release a bug fixed version.

@jlowe-SFDC
Copy link
Collaborator

Update...

I tested this further with trying to add back in a standard property and confirmed that the length is not enforced for these. However, doing it this way the standard property editor sits outside of the custom one, it doesn't appear in the correct "Base Settings" tab so the UI looks weird.

Therefore, I implemented a simple LWC (customPropertyEditorQuery) to show a simple lightning-input field that does not enforce any limit. I've updated the Custom Property Editor to reference this in place of the built in "lightning__textType" property type. This is then applied to the Base Settings tab to show in the correct place. Whilst more complex approach, it does work around the 255 character limit.

Finally, as per the developer guide PDF, Custom Property Editors are still in Beta. There are limitations in that a Custom Property Editor can't be updated, or deleted if they are referenced in LWCs so removing the customQuery property and replacing with the above configuration isn't possible during an upgrade. The package must be uninstalled and reinstalled with a new version to implement this fix.

Reference:
https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/Custom_Property_Types_and_Editors_Beta_Summer-23.pdf

I'll package this up tomorrow, and give you an install link for testing.

@Mike-Cleaver-LB
Copy link
Contributor Author

Thanks heaps! Would an alternative solution have been to use metadata/custom settings so that all the configurations are in a similar place? But you have a work around, that's awesome. Thanks for your work!

@jlowe-SFDC
Copy link
Collaborator

@Mike-Cleaver-LB I did consider that in the original version, but it would have meant another query to realise settings, whereas the property panel settings are just available in the LWC framework and reactive to changes automatically. The only reason the log setting is in a metadata record is so that you don't have to publish/re-publish the whole site in a production environment for an admin to turn it on/off. The settings on the component are generally set when you install and changes need to go through a release process to change the functionality. The fields naturally belong in custom metadata due to the 1:N nature. Hope that makes sense?

@Mike-Cleaver-LB
Copy link
Contributor Author

Totally. Thanks for clarifying

@jlowe-SFDC
Copy link
Collaborator

This is fixed and released as v1.87 on the AppExchange.

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