Below codes showed how to use channel GUID in VCM to build the link to correct page.
String channelId = “……………..”; //Channel GUID in VCM
RequestContext rqCtx = PageUtil.getCurrentRequestContext(pageContext); // get request context from current request
String link = XSLPageUtil.buildLinkURI(rqCtx, channelId, "", "");