I created a SmartObject in K2 designer and I added the WCF url as service reference.
Below is the code
UserDetailsSvcClient userDetail = new UserDetailsSvcClient();
userDetail.Open();
UserDetails userDC = new UserDetails();
var userDetailsList = userDetail.UserDetailsSvc_Load(userDC);
userDetail.Close();
But the userDetailsList
always remains as null
.
Also the GetList
Smart method is not appearing
I am going to assume you have enabled endpoints on the K2 Server. If not ,refer to the following, Link to Endpoint Creation PS: You need to restart K2 Server before the changes are taken in to effect.
From the codes, seems like you are try to do a Load method. Load method will require a ID.
So for UserDetails userDC = new UserDetails();, add in the following:
As for GetList, you dont need to pass it the UserDetails object.