Delete Hours Entries from Billing Records using API module | Community
Skip to main content
Level 9
September 18, 2023
Solved

Delete Hours Entries from Billing Records using API module

  • September 18, 2023
  • 1 reply
  • 1580 views

Hi Fusion Community,

 

I'd like to bulk remove/delete hours entries from a number of open billing records.  It looks like I would need to use the DELETE method via an API module in Fusion.  Is anyone willing to guide me through this?

 

Thanks!
Nick

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by cverges

I think you have to use the Custom API Call module (at least, that's how we do it).  Here's an example pipeline that gets to just the deletion portion.  Note that it's simply about setting the hours value to an empty array.

1 reply

Level 5
September 18, 2023

It's pretty straightforward.  You can either use the Delete module or the Custom API module with a method of DELETE and a URL of bill/{id}.  Just make sure the billing record first has no hours associated to it and it's not in "invoiced" status.  So you may need to do some updates to the record PRIOR to the deletion itself.

Router

--> Change status to uninvoiced

--> Remove association to any hours

--> Delete the object

 

The removal of association to hours is the trickiest part, but it's just a bill/{id} update call where you set the hours to an empty array / null.

NickVa7Author
Level 9
September 20, 2023

Thanks for this, cverges-medallia.
The part I'm uncertain on how to create is the last part, the removal of association to hours and setting the hours to an empty array/null.   Are you able to show a screenshot of how you would set up that module?

cvergesAccepted solution
Level 5
September 20, 2023

I think you have to use the Custom API Call module (at least, that's how we do it).  Here's an example pipeline that gets to just the deletion portion.  Note that it's simply about setting the hours value to an empty array.