You need to sign in to do that
Don't have an account?
chikku
it Causing errors while debugging..there any solutions guys.
System.NullPointerException: Attempt to de-reference a null object in apex
it Causing errors while debugging..there any solutions guys.
private static Application__c app{get; private set;} public static void MyController() { Id id = ApexPages.currentPage().getParameters().get('id'); system.debug('--check--'+id); try{ app = (id == null) ? new Application__c() : [SELECT id,Name FROM Application__c WHERE Id = :id]; }catch(System.QueryException e){ }} public static Application__c getapp() { return app; } }
Can you more elaborate or provide your full code for that problem if Possible because I want to understand where the problem occurs so I try to solve this.
But for now, I provide you a reference link that may help you to fix the issue.
https://www.sfdcpoint.com/salesforce/system-nullpointerexception-attempt-to-de-reference-a-null-object/#:~:text=null%20object%20error-,System.,to%20initialize%20the%20memory%20first.
if you find your answer then mark it as the best answer.
Thanks and Regards,
Suraj Tripathi.