Throw Exception Using Apex Code in Salesforce |

Поділитися
Вставка
  • Опубліковано 6 жов 2024
  • 🚀Join this channel to gain access to the new features of Salesforce.
    www.youtube.co...
    Hello Everyone,
    In this video, we dive deep into the world of exception handling in Salesforce Apex. Learn how to throw exceptions in your Apex code effectively and understand when and why you should use custom exceptions. We'll cover everything from basic exception handling to creating and throwing custom exceptions that can make your code more robust and maintainable.
    What you'll learn:
    The basics of exception handling in Apex.
    How to throw standard exceptions in Salesforce.
    The importance of using custom exceptions.
    Step-by-step examples and best practices.
    Whether you're a beginner or an experienced Salesforce developer, this tutorial will help you improve your Apex coding skills by mastering the art of exception handling.
    📌 Find the Salesforce Related tutorials below:
    📌Lightning Administrator:
    • ORGanizer Chrome exten...
    📌Lightning Development:
    • What is Apex Developme...
    📌Lightning Web Component:
    • How to Configure and U...
    📌JavaScript for Lightning Web Component:
    • Difference between var...
    📌Salesforce Lightning Flow Builder :
    • How to use Screen Flow...
    📌Salesforce Lightning Component :
    • How to work on Aura Ha...
    📌Salesforce Integrations:
    • How to send Outbound M...
    Contact Me -
    📌FaceBook
    / salesforcehunt
    📌LinkedIn
    / salesforcehunt
    📌Pinterest
    / salesforcehunt
    📌Quora
    www.quora.com/...
    📌Telegram
    t.me/joinchat/...
    📌Blog
    salesforcehunt...
    🔔 Subscribe to my UA-cam channel
    www.youtube.co...
    #salesforcehunt | #salesforce | #apex | #exceptionhandling

КОМЕНТАРІ • 8

  • @manendrasaipasalapudi5589
    @manendrasaipasalapudi5589 Місяць тому +1

    Learnt a new thing thanks

    • @SalesforceHunt
      @SalesforceHunt  Місяць тому +1

      Thanks hope you like it and subscribe the channel for more info tech also please share with your network it will help others as well

  • @madhumohan2952
    @madhumohan2952 Місяць тому +1

    Sir , i didt understood at line 2 , before we have main class and inside at line 2 it is subclass of main class , if i am not wrong , so what is invalidaccountexception class is doing there ? its extending a exception class which was given by apex framework , but here if that is so y didnt you used that extending for main class itself , y again another sub class you have declared and used , also it started at line 2 and ended at 3 so what actuallly it does , please give me a clarity on this

    • @SalesforceHunt
      @SalesforceHunt  Місяць тому +1

      If you have your main custom apex class inside this class if you want to throw custom exceptions then you have to use inner class and inherit from exception class then you can use it in this your custom apex class please you have to learn OOP to understand the concept watch my OOP programming playlist then you will be clear.
      I hope you are cleared now
      🔗Link here: ua-cam.com/video/PMJTfmyNd9g/v-deo.html

    • @madhumohan2952
      @madhumohan2952 Місяць тому +1

      @@SalesforceHunt sure sir thanks 👍

  • @manendrasaipasalapudi5589
    @manendrasaipasalapudi5589 Місяць тому

    Hi actually one small doubt we are using extends exception so tht we need to create class for tht or it's a inbuilt one

    • @SalesforceHunt
      @SalesforceHunt  Місяць тому +1

      This is standard Exception class given by the apex framework, This is parent class for all kind of the exceptions

    • @manendrasaipasalapudi5589
      @manendrasaipasalapudi5589 Місяць тому

      @@SalesforceHunt Ok got it thanks for quick response😇