Throw Exception Using Apex Code in Salesforce |

Поділитися
Вставка
  • Опубліковано 7 жов 2024

КОМЕНТАРІ • 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😇