Skip to main content
Is there a way to access the value that is put in the Web Page Url textbox in the designer using the API?

Could you be more specific as to were exactly you would be looking to retrieve the URL via API?

For example, if you View Code on the specific client event and drop down to the C# code, you will see the below:

       private void SendWorkToInternet(object sender, EventArgs e)
        {
            string strURL = K2.Configuration.InternetUrl;
            strURL = strURL.Replace("{SERIALNO}", K2.SerialNumber);
            K2.AddWorklist(K2.Configuration.InternetPlatform, System.Web.HttpUtility.UrlPathEncode(strURL));
        }

The line that I have made bold is retrieving the value from the Text Box.

If you are trying to retrieve the value from a different event, then no, there is no context to look across configuration of events.  That being said, you shouldn't be hardcoding (e.g. manually typing) a URL into the text box anyway as it makes deployment across environments difficult. You should be using an Environment Library field, or data field or SmartObject property.  If this is used, then you can reference the Env Lib/Data/SmartObject field anywhere in the process and it should contain the same data as the Client Event.

HTH.


Thanks. 


We are creating a control that shows a user all of their worklist items from many different workflows.  I was hoping there was a generic way to get the url so that regardless of workflows added or changed we could retrieve the link rather than maintining the same set of datafields for each of our workflows.  Oh well.  Thanks again.


I guess you will use SourceCode.Workflow.Client API to get the worklist items for your user. After you have executed the getWorklistItems method, you will have in return a worklistitems object. Each item are a worklistitem and on this object you have a string property called "data"... this property corresponds to the url of the client webpage.


HTH


Thanks!  I'll give it a try.


Reply