How is expense line record created in servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2023 02:10 AM - edited 01-22-2023 02:11 AM
Hi Community,
On project form when we create resource plan and time sheet is filled by the resource, a expense line record is created.
I had found one BR: Create Expense Line, which is not the same because the short description set by this BR is different from what I am getting in my expense line record created after time sheet is completed.
Also, had found one SI: "ProjectUnAccountedExpensesHandler" which is being called by BR: "DefaultMiscCostPlanOnUnAccExp" where they are checking the expense type value and setting resource type value.
So from somewhere this Expense line record is created.
Please help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2023 02:11 AM
Since you were really helpful to me in this ITBM learning journey, so again requesting you to give your some insight.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2023 08:50 PM
Hi @Drishti,
I do not have the knowledge on timecards. You can check the business rule: Process time card
Script includes: TaskRateProcessor
Function: processTaskTimeCardWithDailyRate
Expense line creations handled here.
DefaultMiscCostPlanOnUnAccExp business rule is introduced in Tokyo to link expense lines which do not have any cost plans to a system generated cost plan.
Details can be found here: System-generated cost plans (servicenow.com)
One note here is for a project only 2 system generated cost plans will be created. One for capex one for opex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2023 02:57 AM
Thanks for replying.
But frankly speaking, I am walkthrough the System I am getting confused.
Once time card is submitted which record is created first Cost Plan or Expense Line ?
My main area of concern is: how this Expense type value is being set on Expense Line record. Whichever scripts I am opening I can see first they are checking the Expense type value then setting on Expense Line form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2023 10:29 AM
If any user submit time card a expense line will be created for that and those amounts will roll up to cost plan and projects.
90 % of time cards will have resource plans which means it will have cost plans.
Insight: In ServiceNow Resource plans is for maintaining user allocations like how many hours he is allocated and still how much available what is total capacity like that.
When ever you create a resource plan one cost plan will be created OOB to maintain amounts of that allocation which will be rolling to Projects and programs.
10 % time cards will be operational resource plans like time off, meeting, training and other standard activities which don't create expense lines. For these if you want expense lines need to be created add valid rate model in operational resource plan you create. FYI, Operational resource plans are not task based like task will be empty so system don't know about rates.
If you create project task and add assignment group to the task. Then that can be also eligible for time submssion in TCP for that members.
For normal resource plans from task(project.rate model) it will take rates. based on those rates only all calculations will happen.
ITBM is tricky module you should understand the flow.
Thanks,
Bharath
Bharath Chintala