This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class competitorEntryController { | |
private String Oppid; | |
public oppwrapper parentrec{get;set;} | |
public List<oppwrapper> opplist{get;set;} | |
public competitorEntryController(Apexpages.standardcontroller controller){ | |
Oppid=(string)controller.getrecord().get('Id'); | |
parentrec=new oppwrapper(); | |
for(Opportunity opp:[select id,name,(select id,name,name__c,Stage__c,NextStep__c from Competitors__r order by name), | |
Stagename,nextstep from Opportunity where id=:Oppid]){ | |
parentrec.opp=opp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class competitorEntryController { | |
private String Oppid; | |
public oppwrapper parentrec{get;set;} | |
public List<oppwrapper> opplist{get;set;} | |
public competitorEntryController(Apexpages.standardcontroller controller){ | |
Oppid=(string)controller.getrecord().get('Id'); | |
parentrec=new oppwrapper(); | |
for(Opportunity opp:[select id,name,(select id,name,name__c,Stage__c,NextStep__c from Competitors__r order by name),Stagename, | |
nextstep from Opportunity where id=:Oppid]){ | |
parentrec.opp=opp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page controller="Practice_customLookupPageController" id="wpage"> | |
<script type="text/javascript"> | |
var templatenameid; | |
function openTemplatePopUp(field){ | |
var anchortagid=field.id; | |
var rowindex=anchortagid.substring(9,10); | |
templatenameid='wpage:form1:pgb1:pgbks1:pgbsi1:pgbt1:'+rowindex+':Template'; | |
//alert('--anchortagid:'+anchortagid+';--templatenameid:'+templatenameid); | |
if (field != null) { | |
field.href = "JavaScript:openLookup('/_ui/common/data/LookupPage?lkfm=editPage&lknm='+templatenameid+'&lkrf=&epf=1&lktp=00X',670,'1','&lksrch=' + escapeUTF(getElementByIdCS(templatenameid).value.substring(0, 80)))"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} | |
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} | |
try{ | |
var caseId = '{!Case.id}'; | |
if(confirm('Are you sure you want to assign this case to yourself.')) { | |
//fetch logged in User details | |
var user = sforce.connection.getUserInfo(); | |
var CaseToUpdate = []; | |
var rec =sforce.connection.query("Select id,ownerId from Case where id='"+caseId+"' Limit 1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} | |
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} | |
try{ | |
var records = {!GETRECORDIDS($ObjectType.Contact)}; | |
var SelectedIds=''; | |
var updatedList = []; //list of contacts to be updated | |
var accid; | |
if(records.length<1) { | |
alert("Please choose at least one contact."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} | |
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")} | |
try{ | |
var eventId= '{!Event.Id}'; | |
var nurl="/"+eventId; | |
// Now make a synchronous call to the Apex Web service method | |
var result = sforce.apex.execute ( | |
"SendNotificationToAttendee", // class | |
"sendNotification", // method | |
{ eid: eventId } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page > | |
<!-- Remote Objects definition to set accessible sObjects and fields --> | |
<apex:remoteObjects > | |
<apex:remoteObjectModel name="Account" fields="Id,Name,Industry"> | |
</apex:remoteObjectModel> | |
</apex:remoteObjects> | |
<!-- JavaScript to make Remote Objects calls --> | |
<script> | |
var createAccount = function(){ | |
try{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page > | |
<!-- Remote Objects definition to set accessible sObjects and fields --> | |
<apex:remoteObjects > | |
<apex:remoteObjectModel name="Account" jsShorthand="Acc" fields="Name,Id"> | |
<apex:remoteObjectField name="Industry" jsShorthand="Indust"/> | |
</apex:remoteObjectModel> | |
</apex:remoteObjects> | |
<!-- JavaScript to make Remote Objects calls --> | |
<script> | |
var fetchAccounts = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apex Code: | |
HttpRequest req = new HttpRequest(); | |
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID()); | |
req.setHeader('Content-Type', 'application/json'); | |
String domainUrl=URL.getSalesforceBaseUrl().toExternalForm(); | |
system.debug('********domainUrl:'+domainUrl); | |
req.setEndpoint(domainUrl+'/services/data/v28.0/tooling/query/?q=Select+id,DeveloperName,Sharingmodel,NamespacePrefix+from+CustomObject'); | |
req.setMethod('GET'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apex Code: | |
HttpRequest req = new HttpRequest(); | |
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID()); | |
req.setHeader('Content-Type', 'application/json'); | |
String domainUrl=URL.getSalesforceBaseUrl().toExternalForm(); | |
system.debug('********domainUrl:'+domainUrl); | |
req.setEndpoint(domainUrl+'/services/data/v33.0/tooling/query/?q=Select+id,FullName,TableEnumOrId,ValidationName,Metadata+from+ValidationRule'); | |
req.setMethod('GET'); | |
Http h = new Http(); |
OlderNewer