To create a dynamic pages and its structure, you can use ‘Dynamic Component factory’ Algorithm. You can divide page into different blocks like here is example of FullWidgets. Consider Objects for above example 1. IPA_Page__c (record creates a new VF Page) 2. IPA_widget__c (record creates a new Widget) 3. IPA_Page_Widget__c (Junction Object) /*...
Download file in Attachments in Salesforce
public class ex_file_inSF { public void getExcelReport() { String AccId = ApexPages.currentPage().getParameters().get('id'); Account acc = [Select Id from Account where Id =: AccId]; Http h = new Http(); HttpRequest req = new HttpRequest(); string url = 'URL_Path'; url = url.replace(' ', '%20'); req.setEndpoint(url); req.setMethod('GET'); req.setHeader('Content-Type', 'application/xls'); // To...
Started onsite journies for me and Nanostuffs !!!!
It was first time in Nanostuffs’s history of sending resource for Onsite project and I am happy that was me. 🙂 As usual, everyone want different experiences in their own life and It was an opportunity for me to gather experiences. I was flying first time in my life + it was for US, quite excited moment I ever had. Here I have chance to share about Nishant & Ankita, how much they care...
Create a Lead in Salesforce using JAVA
In Salseforce : 1. Download Enterprise WSDL as name enterprise.wsdl 2. Download wsc-22.jar from (wsdl and wsc-22 should be in same Directory) goto Command Prompt 1. goto Directory where wsdl file located. 2. Type : java -classpath wsc-22.jar com.sforce.ws.tools.wsdlc enterprise.wsdl.xml enterprise.jar (enterprise.jar will be created) In Eclipse :...
XML Parsing in Salesforce
<?xml version='1.0' encoding='iso-8859-1' ?> <Root> <Record> <CateID>1</CateID> <Name>NameABC</Name> <Phone>12356</Phone> <Email>info@gmail.com</Email> <Website>; </Record> <Record> <CateID>2</CateID> <Name>Namexyz</Name> <Phone>456879</Phone>...
java.lang.OutOfMemoryError: Java heap space
add line to catalina.sh or catalina.bat: export CATALINA_OPTS=”-Xms512M -Xmx1024M” a) The -Xmx argument defines the max memory size that the heap can reach for the JVM. A low value can cause OutOfMemoryExceptions or a very poor performance if your program’s heap memory is reaching the maximum heap size. b) The -Xms argument sets the initial heap memory size for the JVM. This...
java.security.AccessControlException: access denied (java.net.SocketPermission host connect,resolve)
The Simple solution is :search catalina.policy file and edit green line as // Precompiled JSPs need access to this system property. permission java.util.PropertyPermission”org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER”,”read”; permission java.net.SocketPermission “*”, “connect”; permission java.net.SocketPermission “*”...
Code to update an Excel using DataSet and the OleDbDataAdapter in C#
using System; using System.Collections.Generic; using System.Text; using System.Data.OleDb; using System.Data; namespace ExcelDataAdapter { class Program { static void Main(string[] args) { string xlsFile = @"C:\Temp\AdapterTest.xls"; string xlsSheet = @"Sheet1$"; // HDR=Yes means that the first row in the range is the header row (or field names) by default...
How to enable .net to access Quickbooks company file
To do this You should have : A) QuickBooksEnterprise (here we used 13) B) QBSDK (here we used 12.0) c) Microsoft Visual Studio 2008 How we can do ? a. Open Connection to QuickBooks b. Begin session with a company file c. Construct set of request messages d. Send request to QuickBooks e. Receive response messages f. End session g. Close connection a. Open Connection to QuickBooks :...