You need to sign in to do that
Don't have an account?
bharath kumar 52
Display error message from Apex controller's constructor in lightning
Hi All,
I am working on converting a vf page to lightning component where i need to display error messages from a constructor.
The above code works in VF. But, how do i display the message in a lightning component?
Thanks and Regards,
Bharath Kumar M
I am working on converting a vf page to lightning component where i need to display error messages from a constructor.
//Following is the code in the constructor catch(exception ex){ ApexPages.addmessage(new ApexPages.Message(ApexPages.Severity.ERROR,String.ValueOf(ex)));// This is for vf }
The above code works in VF. But, how do i display the message in a lightning component?
Thanks and Regards,
Bharath Kumar M
I think you should try like below code snippt. If this solution helps you please mark it solved.
Thanks
Hemant