12
As of now, if you have your Vendor Workflow turned on, you cannot update Vendors information through eConnect. You will receive a message saying that this must be done through the front end in Microsoft Dynamics GP.

Adding logic to allow updates through eConnect to Vendors even with Workflow turned on, would be a great addition to eConnect.

Essentially the only way to get through this is by turning the Workflow off, then updating the vendors and turning it back on, but then you also have to make sure you set the workflow status back to what it was or else it will come in as a 0 which is invalide.

PRE PROC

Update WF100002
Set Active = 0
Where Workflow_Type_Name = 'Vendor Approval';

if exists(select VENDORID from PM00200 where VENDORID = @I_vVENDORID)
begin
select @I_vUSRDEFND1 = (Select Workflow_status from PM00200 where VENDORID = @I_vVENDORID)
End

Else

Begin
select @I_vUSRDEFND1 = 1
End

POST PROC

Update WF100002
Set Active = 1
Where Workflow_Type_Name = 'Vendor Approval';

update PM00200
Set Workflow_Status = @I_vUSRDEFND1
where VENDORID = @I_vVENDORID

I tested this in my environment and it worked for me.
STATUS DETAILS
Completed
Ideas Administrator

Thanks for the suggestion.
This can be handled through a pre/ post procedure.

If the Workflow is turned off (Not Activated) then by default the vendors would be updated or imported with a status of (Not Activated) unless you used post or preproc logic in eConnect to preserve the status that it was previously when you imported.


When you have a status of Not Activated, the Vendor is treated as if it has never have workflow active on it before. So they will still be able to post transactions for these Vendors, but next time they click Submit on one of these vendors, they could see error messages on the Workflow tables. Such as cannot insert NULL value on WF30100.
After a Vendor has been through workflow there should be a record in the WFI10002 table for that Vendor Record. The Workflow_Status column on this table should match the Workflow_Status column on the PM00200 table.
You could try using a query such as this to look for any Vendors which have a mismatch on the Workflow_Status between these 2 tables.


select VENDORID, a.Workflow_Status, b.Workflow_Status from PM00200 a join WFI10002 b on a.VENDORID = b.WfBusObjKey where b.Workflow_Type_Name = 'Vendor Approval' and a.Workflow_Status <> b.Workflow_Status

Once you have confirmed which Vendors do not match up, you could run the following update to get the tables back in synch. (I would highly recommend making a restorable backup of the database or do this in a test company with a copy of live before running any updates on the data as these scripts are provided as is and are not supported)


  1. PM00200 set Workflow_Status = b.Workflow_Status FROM WFI10002 b JOIN PM00200 a on a.VENDORID = b.WfBusObjKey where b.Workflow_Type_Name = 'Vendor Approval' and a.Workflow_Status <> b.Workflow_Status

    After running the script, any vendor that was truly previously approved through workflow will have it’s status set back to 6 for completed and they will not need to be reapproved. If the Workflow_Status remains a 9 on a vendor, then they truly have never been through an active workflow in the past.
Terry Heley
Microsoft

Comments

I

Yes, please!

Category: Tools - Workflow