Skip to content

Instantly share code, notes, and snippets.

View dangt85's full-sized avatar

Daniel Gonzalez dangt85

View GitHub Profile
@dangt85
dangt85 / gist:59433b49c73fe32584d3
Last active September 8, 2015 19:20 — forked from tstachl/gist:2760221
Salesforce open Simple Dialog in custom button/link or on a visualforce page
// if you want to use it inside a visualforce page create a function around it
//function showFollowUp() {
// if you want to use it in a button make sure you require jQuery
// {!REQUIRESCRIPT("https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js")} // UNCOMMENT IF IN A BUTTON
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
// get the dialog with your dialog name
var d = sfdcPage.dialogs['MyCoolDialog'], close;
if (!d) {
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@include file="_inc/tags.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title><spring:message code="app.title"/></title>
<link rel="stylesheet" href="<c:url value="/_css/style.css"/>" type="text/css" media="screen"/>
</head>
<body>