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
| Type t = Type.forName('Account' ); | |
| sObject o = (sObject)t.newInstance(); |
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
| Id objId = 'a4XS0000000DNjWMAW'; | |
| // Variables for Managing Iteration | |
| List<Id> objsToProcessLst = new List<Id>(); | |
| Set<Id> objsToProcess = new Set<Id>(); // Set Ids of objsToProcess to process to prevent double-processing from a second reference | |
| Set<Id> objsProcessed = new Set<Id>(); // Set Ids transferred from objsToProcess to Processed objs to prevent re-processing from a second reference | |
| Map<Id, Id> oldIdtoNewId = new Map<Id, Id>(); | |
| Map<Id, Id> newIdtoOldId = new Map<Id, Id>(); | |
| Map<Id, Integer> origIdtoLevel = new Map<Id, Integer>(); | |
| Map<Integer, Map<Id, sObject>> levelMaptoOldIdtosObject = new Map<Integer, Map<Id, sObject>>(); |
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
| // Build List of Fields for View Query from Pre-Defined Object FieldSet | |
| private String fieldListStr{ | |
| get{ | |
| if(fieldListStr == null){ | |
| // Build List of Object Fields from Field Set for Object | |
| List<String> fieldList = new List<String>(); | |
| fieldList.add('Name'); // Name Always Included | |
| for(Schema.FieldSetMember field : SObjectType.WorkPackageLine__c.FieldSets.ServiceContractView.getFields()) { | |
| fieldList.add(field.getFieldPath()); |
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 listView { | |
| ApexPages.StandardSetController controller; | |
| public listView(ApexPages.StandardSetController controller) { | |
| this.controller = controller; | |
| controller.setPageSize(5); | |
| } | |
| public pageReference ShowAll() { | |
| controller.setPageSize(controller.getResultSize()); | |
| return null; |
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 standardController="Custom_Object__c"> | |
| <apex:detail subject="{!Custom_Object__c.Id}" relatedList="true"/> | |
| <apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"/> | |
| <script> | |
| var j$ = jQuery.noConflict(); | |
| j$("iframe").each(function(){ | |
| j$(this).load(function() { | |
| j$(this).height( j$(this).contents().find("body").height() ); | |
| }); | |
| }); |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |