Tuesday, 4 March 2025

Add workflow memeber to the exixsting flow

requirement that add new approver in first step 
solution:
1.Update squence with +1 
2.then insert new record
 

UPDATE tbl_WorkFlowMembers

SET Approver_Sequence = Approver_Sequence + 1

WHERE WorkFlow_ID IN ('WF2013RAILGBNot000041',

'WF2014RAILUSSou000043',


INSERT INTO tbl_WorkFlowMembers (WorkFlow_ID,Division_ID,Country_Code,User_ID,User_Email,User_Title,Site_Location,Operation_ID,  Approver_Sequence)

SELECT WorkFlow_ID, 'RAIL',Country_Code, 'mlfoster','mlfoster@harsco.com','Global FP&A Director',Site_Location,Operation_ID, 1

FROM tbl_WorkFlowMembers

WHERE WorkFlow_ID IN ('WF2013RAILGBNot000041',

'WF2014RAILUSSou000043',

'WF2020RAILAUBre000036',

'WF2020RAILBRBra000036',

'WF2020RAILCHLuz000036',

)

AND Approver_Sequence = 2;

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...