Change Approved status to Pending Approval

Answered

Hi,

We need to change approval status on historical supplier invoices from “Approved” to “Pending Approval”.
Essentially, what we want to achieve is all historical supplier invoices to be removed from EFT Bill payments, so they can be first reviewed and only if needed go to Bill payment processing (after being approved).

Is there any way to achieve it?

Many thanks!

Beginner Asked on February 28, 2023 in Best Practices.
Add Comment
17 Answer(s)
Best answer

OK. Let’s see if we can get the Custom Mass Update to work in SB.

Based on this article, you want your script file to look something like this:

https://suiteanswers.custhelp.com/app/answers/detail/a_id/10631

function updateApprovalStstus(rec_type, rec_id) {
    nlapiSubmitField(rec_type, rec_id, ‘approvalstatus’, 1);
}

Upload the file with a .js extension then go to Customization > Scripts > New.

Select the file, select Mass Update as the type and then enter updateApprovalStstus is the function field.

Save and Deploy to a Vendor Bill.

And then this is how you launch the Mass Update script:

https://suiteanswers.custhelp.com/app/answers/detail/a_id/10610

Intermediate Answered on March 1, 2023.
Add Comment

Copying and pasting from here can be a bit odd. Please make sure it is copying a single quote character:


function updateApprovalStatus(rec_type, rec_id) {

nlapiSubmitField(rec_type, rec_id, 'approvalstatus', 1);

}

Intermediate Answered on March 6, 2023.
Add Comment

Hi,

What approval workflow are you using? It may be that you can do this with a Mass Update.

Thanks,

Chris

Intermediate Answered on February 28, 2023.
Add Comment

Hi Chris,
I have created a simple bill approval workflow. But it’s only applicable to newly created supplier invoices. I can’t change it on the historical ones (tried with the CSV- didn’t work).
Maybe it could be some other work around as currently Finance is doing manual approval in Excel for historical supplier bills and then tick the boxes on the EFT bill payments for the approved ones (sometimes it might take them whole day as it might be a lot of transactions).
If Mass Update then what would be the criteria?
Thank you!

Beginner Answered on February 28, 2023.
Add Comment

Hi,

Apologies – I’ve just checked now that I’m back at my desk and the approval status field isn’t available in a standard Mass Update.

I assume your criteria would be something like any bills that are approved and before a given date?

It’s the sort of thing that could certainly be scripted. With that in mind, a Mass Update script might be your easiest way to do this

https://suiteanswers.custhelp.com/app/answers/detail/a_id/10631

Let me know if you need any more details.

Thanks,

Chris

Intermediate Answered on March 1, 2023.
Add Comment

Hi Chris,
Many thanks for looking into it.
I am afraid I won’t be able to do scripting as not as advanced(
Is there any other way to overcome the issue?

The main issue is that Finance is doing manual approval in Excel for the historical supplier invoices and then tick the boxes on the EFT bill payments for the approved ones (sometimes it might take them whole day as there might be a lot of transactions).

Sorry, if I am not clear, I’ve been thinking about it for so many days now and probably confusing myself..

Appreciate any help here! Thank you

Beginner Answered on March 1, 2023.
Add Comment

Hi Daria,

So which fields do you want to update? And are you clear about which bills are to be included in your update?

I appreciate your reticence around scripting but the required code is one line long so I’m sure we can work it out. Do you have a sandbox to test in?

Thanks,

Chris

Intermediate Answered on March 1, 2023.
Add Comment

Hi Chris,
Thanks for getting back to me.
If I could update approval status from “approved” to “pending approval” on the historical supplier invoices I thought all those invoices will stop being shown on the EFT Bill Payments and will go via the approval workflow I have created.
This should hopefully save Finance lot of time as they won’t have to look for the specific approved invoices among 10000 of historical invoices on the EFT Bill Payments and manually tick the box. As only approved invoices should be shown there. Am I right?

Or it could be another way but I can’t think of anything else.

I have Sandbox, yes 🙂

Thanks again!

Beginner Answered on March 1, 2023.
Add Comment

Hi Chris,
Sorry for the delay- didn’t have chance to test it today.
I will do tomorrow. Where can I save that Java file first, so I can upload it after? Would it be Notes?
Thank you so much for your help!

Beginner Answered on March 1, 2023.
Add Comment

Hi Daria,

You’d typically create a text document on your PC, change the extension to .js, then upload to File Cabinet > SuiteScripts.

Thanks,

Chris

Intermediate Answered on March 2, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor