The purchasing team want to be able to add comments against PO lines via a nightly DMT script, using the ‘POCombined’. (they log all their notes on a spreadsheet during the day)
It works fine or the unapproved PO’s, however, I need a way of unapproving the PO to allow the edit and then reapproving it, once the update has completed.
I tried creating a boolean custom field against the PODetail called 'ReApprove_c that I hoped I could use it in a post processing method directive, but it didn’t work.
At the moment the only thing I can think of is to use a UD table, but that really is a last resort.
Are these notes that need to appear on the printed PO, or just notes for internal use (like, “Called Bob to see if he could move it up 2 days, and he said yes.”)?
Would Memos work better?
Also, updating the comments with DMT risks overwriting any comments entered manually through the UI.
Is the Excel file used for anything else? If not, think about making an updatable dashboard that they could leave open, and just update the comments in it, instead of to an external Excel file.
I assume you don’t have purchasing limits. Because if you unaprrove a PO, that originally need approval, you might not be able to just re-approve it. It might have to go through the the user that approved it. You could get around this in DMT by using the approvers login credentials for the DMT command line. But if you have more than one approval person, you’d need to run separate DMT inputs for each.
You can use an updateable dashboard. The UBAQ looks something like this - just added widgets to BASE - to handle unapproving and approving. The user just modifies the CommentText field when editing. You could do the same with DMT if you wanted. Most the requests I do for this use a dashboard for this with this type of UBAQ behind it.
Hi @danbedwards,
have you actually done it and worked for you ?, because i have tried this idea and could not bypass the approve flag at all, even with invoking the changeApproveflag method
Because I modify the base the custom logic does drop on import sometimes. There is a way around this. For now, you can add Set Field widget and do the following with 3 on each side of the Base. Before Base
1 - Set Approve = false
2 - Set ApprovalStatus = “U”
3 - Set ReadyToPrint = false After Base
Do the opposite of above.
.DISCLAIMER
THIS SAMPLE CODE ON “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL COBRA CONSULTING LIMITED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY,
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY WAY OUT OF THE USE OF THIS SAMPLE CODE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#create the file to reapprove the records that were unapproved, adding the approve column set to true
Import-Csv $approveTmp |
Select-Object *,@{Name=‘Approve’;Expression={‘true’}} |
Export-Csv $approve -NoTypeInformation
Is the user running the update-able dashboard setup as a buyer with an unlimited limit? If not then the controls to prevent someone from approving a PO that exceeds their buying limt, may be working against you.
Use this - there are two flavors of this multiple rows and single row. This is the single row and for multiple you put the code inline in the default widget.POUpdate.pdf (842.5 KB)
thanks for your feedback @ckrusen, i agree, but i am trying to update my PO and i have no limit restrictions, beside i would expect the exception message to say that, if it is the case.
Hi @danbedwards,
appreciate your support mate, your technical document is crystal clear and i have done it exactly as per your design, but still no luck