How is expense line record created in servicenow?

Drishti
Tera Guru

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!

4 REPLIES 4

Drishti
Tera Guru

@Nootan Bhat 

Since you were really helpful to me in this ITBM learning journey, so again requesting you to give your some insight. 

Nootan Bhat
Kilo Sage

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.

NootanBhat_0-1674449363872.png

 

 

 

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.

 

 

@Nootan Bhat 

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.

 

 

BharathChintala
Mega Sage

@Drishti 

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

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala