onvalidate trigger in business central | Mandatory fields in bc | Business central complete tutorial

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • Hi Viewers,
    onvalidate trigger in business central | Mandatory fields in bc | Business central complete tutorial
    This channel is dedicated to research aspirants and all who wish to learn technologies with easy examples and exercises. I will be uploading at least three videos every week. You can leave the expected topics which you wish to know in the comment.
    Checkout your favourite playlist
    ==================================================================================
    Important tutorials and videos (Playlist) that you should not miss
    ==================================================================================
    1. Research: • PhD Course details, Ph...
    2. SCI/Scopus/Annexure-I/WoS/UGC care indexed journals
    • SCI, Scopus, Annexure-...
    3. Weka Tutorial:
    • Weka Tutorial
    4. Tableau Prep Builder: • What is Tableau Prep |...
    5. ETL Data Integration: Talend:
    • What is ETL? well Expl...
    6. AL Programming - Microsoft Dynamics 365 Business Central (AL Programming): • AL Programming for abs...
    7. Web Designing for Kids:
    • Simple sign-in form in...
    8. Tableau Desktop: • Learn Tableau Basic Ca...
    9. Python Interview Questions: • What is Negative index...
    10. GraphPad Prism Statistical Tool: • Introduction to GraphP...
    11. R and Rattle GUI for statistics and Research: • Introduction to R and ...
    12. Minitab Statistical Tool: • How to download, insta...
    13. Online teaching tool for teachers, professors and online mentors: • Best online Whiteboard...
    14. Skill-up yourself: • How to become a google...
    ======================================================================
    Social media:
    Blog: learnwithgoms....
    Follow my blog: draft.blogger....
    GitHub: github.com/Gom...
    LinkedIn profile: / gomathisri
    Instagram profile: @goms_tech_talks
    Facebook profile: / goms.techtalks
    Website: sites.google.c...
    ======================================================================
    #gomstechtalks #dynamics365 #businesscentral #bc #bcal #trending #bctable #table #report #page #bctutorial #tutorial #business #central #womeninbusiness #business #365 #central #dynamics365businesscentral #dynamics365sales #alprogram #tableextension #alprogrammingtutorial #trending #bcal #bc #dbcnews #report #rdlc #rdlcreport
    #github #repository #begginers #beginnertoadvanced #beginnertutorials #beginnerstutorial #guidelines #manual #bcmanual #freetutorial #freetutoring #freecourses #freecourse #freecourseswithcertificates #career #microsoft #microsoftproject #projects #project #visualstudio #visualstudiocode #visual #dynamic #dynamics365sales #dynamics365tutorial #onvalidate #trigger #triggerinbc #bctutorial #altutorial
    Happy learning

Комментарии • 32

  • @shabbirworld
    @shabbirworld 10 месяцев назад +1

    Mam, There is Field in Customer Card 'Post Code' i want to validate it . User can only Insert Numeric value and length only 6 digit . how can i validate

    • @gomstechtalks
      @gomstechtalks  10 месяцев назад +1

      Try this in the postcode field trigger()
      trigger OnValidate()
      var
      IsNumeric: Boolean;
      begin
      // Check if the Post Code is exactly 6 digits long
      if StrLen("Post Code") 6 then
      Error('The Post Code must be exactly 6 digits long.');
      // Check if the Post Code is numeric
      IsNumeric := true;
      foreach var Char in "Post Code" do
      if not Char.IsDigit() then
      IsNumeric := false;
      if not IsNumeric then
      Error('The Post Code must contain only numeric values.');
      end;
      }

  • @tahermahmood9360
    @tahermahmood9360 7 месяцев назад +1

    Hi Dr. Hope you are fine.
    Please need your suggestion for correct place. i wrote code in page variable.
    This is correct place or not
    field("Applicant Age"; Rec."Applicant Age")
    {
    ApplicationArea = All;
    Caption = 'Applicant age';
    Visible = false;
    trigger OnValidate()
    begin
    if Rec."Applicant Age"

    • @tahermahmood9360
      @tahermahmood9360 7 месяцев назад +1

      field("Original Invoice No."; Rec."Original Invoice No.")
      {
      ApplicationArea = All;
      Caption = 'Original Invoice No.';
      NotBlank = true;
      ShowMandatory = true;
      field("Applicant Age"; Rec."Applicant Age")
      {
      ApplicationArea = All;
      Caption = 'Applicant age';
      Visible = false;
      trigger OnValidate()
      begin
      if Rec."Applicant Age"

    • @gomstechtalks
      @gomstechtalks  7 месяцев назад

      No, where you have declared/defined "Original Invoice No." and "Reason" ?

    • @tahermahmood9360
      @tahermahmood9360 7 месяцев назад

      @tahermahmood9360
      23 hours ago
      Hi
      This is complete code. please need to check below mention code.
      pageextension 50125 Ext_SalesCreditMemo extends "Sales Credit Memo"
      {
      layout
      {
      // Add changes to page layout here
      addafter("Applies-to ID")
      {
      field("Test"; Rec."Test")
      {
      ApplicationArea = All;
      Caption = 'Test';
      NotBlank = true;
      ShowMandatory = true;
      }
      field("Original Invoice No."; Rec."Original Invoice No.")
      {
      ApplicationArea = All;
      Caption = 'Original Invoice No.';
      NotBlank = true;
      ShowMandatory = true;
      }
      field("Reason"; Rec."Reason")
      {
      ApplicationArea = All;
      Caption = 'Reason';
      NotBlank = true;
      ShowMandatory = true;
      }
      }
      }
      actions
      {
      // Add changes to page actions here
      }
      var
      myint: Integer;
      trigger OnInsertRecord(BelowxRec: Boolean): Boolean
      begin
      if Rec."Test" = '' then
      error('Please enter the Test');
      if Rec."Original Invoice No." = '' then
      error('Please enter the Original invoice no.');
      if Rec."Reason" = '' then
      error('Please enter the reason');
      end;
      }

  • @vishwadeeppal3668
    @vishwadeeppal3668 Год назад +2

    Your way of explaining was very simple to understand for a fresher !! Subscribing your channel :)

    • @gomstechtalks
      @gomstechtalks  Год назад

      Glad to hear. Thank you so much for taking the time to appreciate it.
      Regards,
      Dr. Gomathi

  • @dividuttnamboodiri3283
    @dividuttnamboodiri3283 Год назад +2

    I have a form in my page I want to show validation error message if any single form field is empty when I click OK button..so what can be done.. show mandatory is working but i have to show on clicking OK button on page.

    • @gomstechtalks
      @gomstechtalks  Год назад +1

      Write it in the button trigger

    • @dividuttnamboodiri3283
      @dividuttnamboodiri3283 Год назад +1

      @@gomstechtalks not clear use action trigger which function but ?

    • @gomstechtalks
      @gomstechtalks  Год назад +1

      In the ok button? Can you send the code to check. ?

    • @dividuttnamboodiri3283
      @dividuttnamboodiri3283 Год назад +1

      @@gomstechtalks while creating page we get two buttons OK and Cancel, i have applied validation on ontrigger event but when I click on OK button the data are getting saved even it's blank..so while clicking the OK button I want to show validation error message. (Don't have code for this only created page and table fields).so can you help in this?

    • @gomstechtalks
      @gomstechtalks  Год назад +1

      Please share the table and page code so as to check

  • @HamidIsmail-hf2og
    @HamidIsmail-hf2og Год назад +1

    Hi Dr. Gomathi, Where to get the source code for this , Employeee source code. I am unable to locate it in your blog. Could you forward the link to me. Thank you very much.

    • @gomstechtalks
      @gomstechtalks  Год назад

      Please check here github.com/Gomathikrishna/D365-Business-Central-AL-Programming

  • @gauravSingh-pv6ny
    @gauravSingh-pv6ny Год назад +1

    thankyu so much ma'am you are very supprting for me thanyou so much heartfully 🙏🙏

  • @edyzere
    @edyzere Год назад +1

    Dr. S. Gomathi I want to thank you for wanting to help us with your wonderful videos, they are truly excellent.
    Would you like to help me with a challenge I have with a client? I have to hit an endpoint of an app outside of BC by sending in the request body the values ​​contained in the "Sell-to Customer No." and "No." fields of that same record and a token in the headers when the value in the "Status" field of the Sales Header table (36) changes to "Launched".
    Do you want to help me Dr.? 🙏🏻 Thanks in advance!

    • @gomstechtalks
      @gomstechtalks  Год назад +2

      Thank you for your kind words and appreciation! I'm glad you find the videos helpful. I'd be happy to assist you with the challenge you're facing.
      To achieve your goal of hitting an endpoint outside of Business Central when the "Status" field of the Sales Header table changes to "Launched," you can leverage the Business Central eventing mechanism.
      1. Create a codeunit: Start by creating a codeunit in Business Central, which will handle the event triggering and API call. You can define a function within the codeunit that listens to the "Status" field changes in the Sales Header table.
      2. Event Subscription: In Business Central, navigate to the Events page and subscribe to the OnAfterModify event of the Sales Header table. Assign your codeunit and function to handle this event.
      3. Implement the API Call: Inside the function, write the code to check if the "Status" field has changed to "Launched." If it has, retrieve the necessary values from the "Sell-to Customer No." and "No." fields of the Sales Header table. Then, use an HTTP library or function within Business Central to make the API call to the desired endpoint outside of Business Central. Ensure that you include the token in the headers and pass the required values in the request body.
      Remember to handle any error scenarios and ensure proper error logging within your codeunit.
      I hope this helps you get started with your challenge! If you need further assistance or have more specific questions, feel free to ask. Good luck with your project!

    • @edyzere
      @edyzere Год назад +1

      @@gomstechtalks Thank you very much for wanting to help me.
      I already managed to implement the code in AL with your advice and I have two specific questions about an error I have with the token, but I would like to share the code with you. Can I send it to you by any means?
      Thank you very much for wanting to help me.

    • @gomstechtalks
      @gomstechtalks  Год назад +1

      Yes please mail to gomstechtalks@gmail.com

    • @edyzere
      @edyzere Год назад

      @@gomstechtalks Dr. Gomathi, I already figured out how to solve the token issue so sending the code may not be necessary. I only have one question left: How do I subscribe to the event when a value changes in the "Status" field and not to the entire record, because now I am subscribed to the event when a value changes in the entire record and then I evaluate the content of that field that is not the most appropriate according to your recommendations.

  • @prateekdiwan6480
    @prateekdiwan6480 Год назад +1

    Please make some videos on APP publishing using the BC Admin shell.

  • @chirangaranasinghe19
    @chirangaranasinghe19 Год назад +1

    thanks. i send a email. but no responce.😕

    • @gomstechtalks
      @gomstechtalks  Год назад +1

      Sorry, I didn't see, I am in an official trip. Will check once I am back to the normal routine

    • @chirangaranasinghe19
      @chirangaranasinghe19 Год назад

      @@gomstechtalks oh its okay . No problem ..

  • @konfigurator7268
    @konfigurator7268 Год назад +1

    Thank you dear Goms