Here is the code I have used.
// JavaScript Code
var CustomizeOpportunity = {
sendOpportunityFields : function(executionContext)
{
debugger;
var formContext = executionContext;
var opportunityGuid = formContext.data.entity.getId();
var opportunityTopic = formContext.getAttribute("name").getValue();
// var opportunityCurrency = formContext.getAttribute("transactioncurrencyid").getValue();
// var potentialCustomer = formContext.getAttribute("customerid").getValue();
// var opportunityStatus = formContext.getAttribute("statecode").getValue();
// var opportunityOwner = formContext.getAttribute("ownerid")
alert(opportunityGuid + opportunityTopic);
// Initializing Web Resource Parameter
var pageInput = {
pageType: "webresource",
webresourceName: "cc2_html"
};
// Declaring HTML Page Dimensions
var navigationOptions = {
target: 2,
width: 1050, // in pixels
height: 900, // in pixels
position: 1
};
XMLHttpRequest.Navigation.navigateTo(pageInput, navigationOptions).then(success,error);
function success()
{
console.log("successfully run")
}
function error(){
console.log("Error has occurred...")
}
}
}
//Html Code
