Forum Discussion
Hi Breton
I don't find an easier way to get the URL of an item but you can use the below steps as workaround. You can create a generic method that create the URL and return to your method
Step 1: Create a Server Side (C#) Method and copy below code - Method Name : generateURL
Innovator inn = this.getInnovator();
string itemType = this.getProperty("itemType");
string itemId = this.getProperty("itemId");
string protocol = HttpContext.Current.Request.Url.Scheme;
string hostName = HttpContext.Current.Request.Url.Host;
string dbName = HttpContext.Current.Request.Url.Segments[1];
Item outputUrl = inn.newItem("");
outputUrl.setProperty("itemurl", protocol + "://" + hostName + "/" + dbName + "?StartItem=" + itemType + ":"+itemId);
return outputUrl;
If you want URL of an item in Client Method (Javascript) then use below lines in your method
var getURL = innovator.newItem("Method","generateURL");
getURL.setProperty("itemType", parent.thisItem.getType());
getURL.setProperty("itemId",parent.thisItem.getID());
getURL = getURL.apply();
var itemURL = getURL.getProperty("itemurl");
If you want URL of an item in Server Method (C#) then use below lines in your method
Item getURL = this.getInnovator().newItem("Method","generateURL");
getURL.setProperty("itemType", this.getType());
getURL.setProperty("itemId", this.getID());
getURL = getURL.apply();
string itemURL = getURL.getProperty("itemurl");
Thank You
Gopikrishnan R
- Breton4 years agoIdeator III
Hello, thanks a lot. :-)
I 'm going to check it today.
FB