No expense line created for Operational category timecard in SPM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 09:37 AM
Hi All,
Our customer wants to track the efforts towards different kinds of operational work type under different operational categories. They doesn't want to log it under KTLO. So I have created the operational categories as per their requirements and I have mapped those operational work type to Time card categories as well.
OOTB, expense lines are created for time cards upon approval only of there is a Operational Resource Plan for that user.
If Operational Resource Plan is not created then expense lines are not created.
We have users with only timecard user license so they have only time card user role. They doesn't have pps_resource role so they are not part of any Resource Groups. I cannot make them part of any resource groups as they do not have SPM user license.
Please help me how to make these timecards without resource plans create expense lines upon approval?
Thanks,
Talya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 08:16 PM
Hi Talya,
The Expense Line creation for approved Time Card is independent of Resource Plan. When any time card is being submitted for Project or Project Task and approved, system creates expense lines. Associating Resource Plan to Time Card is optional.
I am curious to know your use case where system is not creating expense lines for approved Time Card
Yogesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 06:58 AM
Hi @yogesh41 ,
We can create Operational work type and Time card category after which we need to map these two so these operational tasks appear under other category of Time Sheet Portal.
For Project and Project Tasks system generates expense lines regardless of Resource plan but not for Operational category/Other category.
If you create Operational resource plan and associate that while submitting operational timecard, then expense lines will be created upon approval of timecard.
If you submit operational timecard without associating any resource plan then after approval of timecard, timecard will be marked as Processed but no expense lines generated.
I have created support case and following it up with ServiceNow. Meanwhile I wanted to know if anyone came across this scenario ?
Thanks,
Talya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 07:51 AM
hi @Talya I am facing same scenario with one of my client, have you ever figured out a way to handle this use case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2024 11:53 PM
Hey @Talya , I think I encountered a similar use case in my experience at Work4flow. Give the below steps a try:
- Expense lines are not created for approved timecards if there is no Operational Resource Plan for the user.
- Create expense lines for operational work timecards even if users do not have an Operational Resource Plan.
- Ensure the operational categories and timecard mappings are correct. Confirm the current process where expense lines are created only if an Operational Resource Plan exists.
- Locate the business rule or script that handles the creation of expense lines upon timecard approval. This will help in modifying the logic to include timecards without Operational Resource Plans.
- Modify Business Rule. Access the relevant business rule or script that creates expense lines. Add a condition to check if a timecard belongs to an operational category and create an expense line regardless of the presence of an Operational Resource Plan.
- Sample Script Modification:
if (current.state == 'approved' && current.time_card_category.operational_category) {
var expenseLine = new GlideRecord('expense_line');
expenseLine.initialize();
expenseLine.u_time_card = current.sys_id;
expenseLine.u_operational_category = current.time_card_category.operational_category;
// Add other necessary fields
expenseLine.insert();
}
- Create and approve timecards for users without Operational Resource Plans. Verify that expense lines are created correctly for these timecards. Ensure no existing functionality is broken by these changes.
- Update the documentation to reflect the new process. Train relevant users on how to log time under different operational categories and ensure they understand the changes.
- Monitor the system after implementing the changes to catch any issues. Gather feedback from users and adjust the script or business rule as needed to ensure it works smoothly.
Let me know if it doesn't work. I'd be happy to assist.