You may received an error as AuraEnabled methods must be named with a prefix 'get'. If yes, check out the below points to resolve the issue,
1. Methods must be static and marked public or global. Non-static methods are not supported.
1. Methods must be static and marked public or global. Non-static methods are not supported.
- @AuraEnabled
- public static string buildName()
- {
- return 'Hi';
- }
2. If you are declaring method without any return type then the method name should prefix with 'get'.
- @AuraEnabled
- public static void getValidName()
- {
- // Logic here.
- }
No comments:
Post a Comment