Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7771147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:34:41+00:00 2026-06-01T16:34:41+00:00

Hello Folks, I am really new to Apex Development and currently trying to write

  • 0

Hello Folks,
I am really new to Apex Development and currently trying to write a test case for this trigger. Any kinds of help is really appreciated!

trigger Milestone1_Expense_Trigger on Milestone1_Expense__c (before insert, before update) 
{
    if(Trigger.isBefore)
    {
        Milestone1_Expense_Trigger_Utility.handleExpenseBeforeTrigger(Trigger.new);
    }
}

Thanks in Advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:34:42+00:00Added an answer on June 1, 2026 at 4:34 pm

    Take a look at the link matthew provided. That should give you an idea on what needs to be done and how you assert and confirm if what you are trying to do is actually happening.
    If i were to explain it in a simple way.

    Your trigger would get fired when an record is inserted/updated in Milestone1_Expense__c.
    So in your test class all you need to do create a test data for Milestone1_Expense__c and give an insert statement.

    if i were to give an example for Account

        Account a = new Account(Name = 'test', Company__c = 'test');
        insert a;
    

    instead of Account here you can give use your custom object and use the fields in that custom object

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello Guys I am trying to figure out why i am gettings this error
Introduction Hello folks, I recently learned to program in C! (This was a huge
Hello i have this code var queue = new BlockingCollection<int>(); queue.Add(0); var producers =
Hello kind folks of StackOverflow. I am trying to make a sort of 'bot'
Hello folks, I've got the issue to add a browser event to some input
Hello I am trying to save a bitmap image in a basic image editor
Hello! I'm not even sure if this is possible, but hopefully it is in
Hello everyone I'm currently having 2 issues with the code below: Upon return of
This particular assignment has to do with removing substrings from strings; I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.