Skip to main content

Hi,

 

I am using Server Event for Updating a column in my custom DB.

Scanerio is - I have column name as "StatusID" in a table. I am trying to update this column in the  code behind of "Default server event(Code) .

Code snippert is

 public void Main(Project_b324105edf184cd7b92e16ff1bf772fda8.EventItemContext_a728bf160913435e8218fde2d1e849cc K2)

int AssignID = Convert.ToInt16(K2.ProcessInstance.DataFieldse"AssignmentID"].Value); 

string GUIDval = K2.ProcessInstance.DataFieldsi"GUID"].Value.ToString();

int currentStatus = 1;

clientAssigt.UpdateAssigntStatus(AssignID , currentStatus); --> There is business layer (clientAssigt") in which "UpdateAssigntStatus" is a method which updates the column "StatusID" in custome DB.

 

As of now there is no  issue in the WF but the column value is not getting updated.

Could any one help me to resolve this issue  - How to update a column value of a table in our  custom Database in Server Event of k2???

Thanks in advance. Your immediate  help will be appreciated.

 

Hi, "231",


Have you considered using a SmartObject event, rather than code behind? If you create a SQL service instance for your custom DB, you should be able to create a SmartObject for the table itself. You could then use a SmartObject event to update the value in the DB.


HTH,


Gail


Reply