A new Flexera Community experience is coming on November 18th, click here for more information.
Hi All,
We need to copy the data from PurchaseOrderNo field to InvoceNo field, to do that we have set the new values with an update SQL query. (below you can find the query)
UPDATE pod
SET
pod.InvoiceNo= po.purchaseorderno,
pod.InheritPOInvoiceDetails = 0
FROM PurchaseOrderDetail pod
INNER JOIN
PurchaseOrder po
ON pod.PurchaseOrderID = po.PurchaseOrderID
WHERE pod.InvoiceNo IS NULL OR pod.InvoiceNo = ''
Inmediately after doing the query it appears in the database and in Flexera Suite GUI. But after one day it gets deleted for apparently no reason.
Could anyone, please, assist us on this?
Thanks!
May 17, 2022 10:31 AM
As the History tab and ComplianceHistory_MT got deleted too and it was not the solution, I share here the response to the case that finally worked in case anyone find it useful:
It looks as though the invoiceNo and invoiceDate cannot be updated if the following fields in the “PurchaseOrder” table are set to a value of 1:
If these Inherit properties are set to 1, the values on the PurchaseOrderDetail record will be overridden by what is on the PurchaseOrder record. That is the purpose of these settings. They both need to be set to 0 to specify separate details per PurchaseOrderDetail.
While InheritPOInvoiceDetails is being set in your script, InheritPOEnterpriseGroups may still have a value of 1 and this would cause the values to get rolled back and would explain why the entry is removed from the history tab.
I would recommend setting the values for InheritPOInvoiceDetails and InheritPOEnterpriseGroups to 0 first, then updating invoiceNo as a separate step.
May 30, 2022 03:02 AM
You may get some insight into what process is reverting the changes by looking at the details on the History tab when viewing the purchase record. Do it show when changes are occurring on the Invoice Number field, and who is making them?
I wonder whether there is a business adapter or some other automation in place that is making a change here.
May 17, 2022 06:37 PM
As the History tab and ComplianceHistory_MT got deleted too and it was not the solution, I share here the response to the case that finally worked in case anyone find it useful:
It looks as though the invoiceNo and invoiceDate cannot be updated if the following fields in the “PurchaseOrder” table are set to a value of 1:
If these Inherit properties are set to 1, the values on the PurchaseOrderDetail record will be overridden by what is on the PurchaseOrder record. That is the purpose of these settings. They both need to be set to 0 to specify separate details per PurchaseOrderDetail.
While InheritPOInvoiceDetails is being set in your script, InheritPOEnterpriseGroups may still have a value of 1 and this would cause the values to get rolled back and would explain why the entry is removed from the history tab.
I would recommend setting the values for InheritPOInvoiceDetails and InheritPOEnterpriseGroups to 0 first, then updating invoiceNo as a separate step.
May 30, 2022 03:02 AM
User | Count |
---|---|
8 | |
7 | |
3 | |
3 |