-
Notifications
You must be signed in to change notification settings - Fork 198
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 OptionsetNames - UnknownLabel1 #349
Comments
Also short comment here from my response on #334. I definitely understand the need for having optionset labels like "Päätös" not to end up in code in a form of "Pts" or "UnknownLabel1". I actually came here to look out for a possibility to add such functionality by myself. I was happy to find out someone had already done that. Nevertheless #334 seems to make labels like "_Päätös" if my mind debugging of the PR code was succesfull although "Päätös" (or a word starting with for example Ä) is perfectly valid enum label. |
Hi, thanks you for your comment. If you have better solutions please make pull request and I will test it. My solutions is base on my experience. |
If I recall correctly I tried to say optionset enum values should not be prefixed with _ unless it is required by .NET and my intepretation of code was that it would generate _ prefix for every value. |
I prefer code which communicates as closely as possible with terms used by end user. When end user uses a term "Päätös" it will improve cimmunication between developer and end user when both use same term for same matter. This in turn will reduce possibilities of misunderstanding hence improving maintainability. Another issue is when you remove diacritics you get "Paatos" which has very different meaning in Finnish language than "Päätös". This makes enum label meaning more vague requiring more effort from developer and end user to agree what is specified which in turn is impediment from my perspective. I would be satisfied if there would be option not to remove diacritics etc. characters if those characters are valid for .NET enums and remove if you want to. I think this would not be huge rework and it would allow non-ascii countries to use special characters when wanted to. |
Hi, I understand your view. Your request is quite unusable for me, but i understand it can be useful to different people. If you want change this functionality you can add pull request to my branche. Thanks for you comments. |
@scottdurow any thougts what should be done in order to get this functionality into released into spkl_dev? We had a internal discussion about this quite critical missing feature. We'd love to be able to use spkl to generate enums which are meaningful instead of being UnknownLabel1234567. Currently we need to manually fiddle around this impediment and doing so hinders our development process quite a bit. One person from our team is doing work which would solve #349 (comment). He is working on top of excellent work already done by @JannyM85 regarding this issue into a branch https://github.com/scottdurow/SparkleXrm/compare/spkl/issues/349-earlyboundoptionsettranslation which has now been stale for almost 12 months. |
Thanks for the push on this - I think I have solved this with a very small change - see #417 |
🐛 Force optionset label to 1033 since it's hard coded in CrmSvcUtil
When generate optionSets earlyboundtypes from CRM then you have problem with EarlyBoundTypes-Optonset name for example :
[System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9154")]
public enum account_preferredcontactmethodcode
{
}
The text was updated successfully, but these errors were encountered: