-
ChatterFeed
-
0Best Answers
-
2Likes Received
-
0Likes Given
-
12Questions
-
6Replies
BatchApex - System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out
I am making a callout and then trying to insert the data and then immediately I make another callout followed by insert operation. This process continues for users matching my criteria. How to avoid below exception?
I know that its not allowed to do a callout and a DML in series. But as per the requirement I need to follow this process.
System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out
Note: I cannot use future method since I am running this process in a batch class.
I know that its not allowed to do a callout and a DML in series. But as per the requirement I need to follow this process.
System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out
Note: I cannot use future method since I am running this process in a batch class.
-
- Case Manager
- June 18, 2015
- Like
- 0
- Continue reading or reply
Display video in a Visualforce Page
I have a video of 200MB, since single static resource file size should not be greater than 5MB I have uploaded the file through chatter. How do I display the video in a VF page?'
Through Static Resource
<video width="75%" controls="controls">
<source src="{!URLFOR($Resource.Video)}" type="video/mp4" />
Your browser does not support the video tag.
</video>
Through Static Resource
<video width="75%" controls="controls">
<source src="{!URLFOR($Resource.Video)}" type="video/mp4" />
Your browser does not support the video tag.
</video>
-
- Case Manager
- May 12, 2015
- Like
- 0
- Continue reading or reply
Update Body of Email Template with Letterhead using APEX
I have created an emai template having a letterhead, I am trying to update few of the fields in the template from APEX and emai it. How can I manipulate the body of the email??
email.setTemplateId('00X1a000000HoOF');
email.setToAddresses(toRecipients);
email.setReplyTo('xyz@abc.com');
email.setTargetObjectId('0051a000000M21z');
email.setSaveAsActivity(false);
email.setTemplateId('00X1a000000HoOF');
email.setToAddresses(toRecipients);
email.setReplyTo('xyz@abc.com');
email.setTargetObjectId('0051a000000M21z');
email.setSaveAsActivity(false);
-
- Case Manager
- May 05, 2015
- Like
- 0
- Continue reading or reply
Reports Access to Customer Community User
How do I provide access to reprots to Customer Community User? I created a visualforce page and included a report, when the community user accessed it, it was displaying "To view the report chart, you need both the Run Reports permission and access to the report's folder.".
Please help me resolve this issue.
Please help me resolve this issue.
-
- Case Manager
- March 20, 2015
- Like
- 0
- Continue reading or reply
Error: You can only select pages that are accessible by the Community Guest User.
Hi,
I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.

I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.
-
- Case Manager
- March 12, 2015
- Like
- 1
- Continue reading or reply
Is it possible to insert Record and Attachment at the same time using Data Loader?
I have a question related to Data Loader, is it possible to insert records from CSV file and corresponding attachments at the same time using Data Loader. If Yes, how is it possible? If Np, what are the alternatives?
-
- Case Manager
- January 30, 2015
- Like
- 0
- Continue reading or reply
Connect to UNIX server through an API
Is it possible to connect to a unix server from APEX code or an API? My requirement is to connect to a unix server and fetch a csv file and place it in my local directoy. Later using Data Loader I need to upload data from the fetched csv file. I do not want to user any third party connectors or applications.
-
- Case Manager
- January 21, 2015
- Like
- 0
- Continue reading or reply
Disable access to reports page from Home Page Component.
I have created a Home Page Component, in that compnent I have added a report using analytics:reportChart. Its displayed on the Home Page but when I click it, it is being redirected to the page where we can run the report/make changes. Is there any way to stop it from being redirected to another page.
Component - homeComp
<apex:component >
<analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:component>
HomePageComponent
<apex:page sidebar="false" showHeader="true" >
<c:homeComp />
</apex:page>
Component - homeComp
<apex:component >
<analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:component>
HomePageComponent
<apex:page sidebar="false" showHeader="true" >
<c:homeComp />
</apex:page>
-
- Case Manager
- December 11, 2014
- Like
- 0
- Continue reading or reply
Customize Flows in Visualforce Pages
Is there any way to customize Flow screens in vf pages? I know its possible using CSS styles but it is very complicated.
I have tried to customize using the information provided in the below page but it was not that much useful.
https://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_customize_runtime_ui.htm
Below is my sample code.
<apex:page >
<style>
.requiredInput{
display: table;
border-collapse: separate;
border-spacing: 5px;
}
.labelCol {
display: table;
border-collapse: separate;
border-spacing: 5px;
}
</style>
<flow:interview name="Survey" />
</apex:page>
I have tried to customize using the information provided in the below page but it was not that much useful.
https://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_customize_runtime_ui.htm
Below is my sample code.
<apex:page >
<style>
.requiredInput{
display: table;
border-collapse: separate;
border-spacing: 5px;
}
.labelCol {
display: table;
border-collapse: separate;
border-spacing: 5px;
}
</style>
<flow:interview name="Survey" />
</apex:page>
-
- Case Manager
- December 05, 2014
- Like
- 0
- Continue reading or reply
Unable to add Form to a Page using Site.com
I am trying to add a form to a page using site.com, Forms section is not avaialable in Site.com Page Elements Panel. I am using Developer edition. Basically my requirement is to add a form in my community where users can fill & submmit and get appropriate replies from the admin. My user role is Site administrator and I have enable Site.com Publisher User field on the user detail page.
-
- Case Manager
- December 01, 2014
- Like
- 1
- Continue reading or reply
Setting custom Keys in a Map
Below is my code which sets Id of Attachment as the Key but how do I set ParentId as a Key in that Map, how do I get that?
Map<Id, Attachment> mapAtt = new Map<Id, Attachment>([Select ParentId, Id From Attachment]);
Map<Id, Attachment> mapAtt = new Map<Id, Attachment>([Select ParentId, Id From Attachment]);
-
- Case Manager
- November 21, 2014
- Like
- 0
- Continue reading or reply
How to auto refresh reports on a Visualforce page?
I am able to display a report on a vf page using the below code, I am hiding the refresh button, now I want to refresh the report for every n seconds or whenever the user opens that visualforce page.
<apex:page>
<analytics:reportChart reportId="00Oj0000001JKgL" size="small" showRefreshButton="false" />
</apex:page>
<apex:page>
<analytics:reportChart reportId="00Oj0000001JKgL" size="small" showRefreshButton="false" />
</apex:page>
-
- Case Manager
- November 20, 2014
- Like
- 0
- Continue reading or reply
Error: You can only select pages that are accessible by the Community Guest User.
Hi,
I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.

I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.
-
- Case Manager
- March 12, 2015
- Like
- 1
- Continue reading or reply
Unable to add Form to a Page using Site.com
I am trying to add a form to a page using site.com, Forms section is not avaialable in Site.com Page Elements Panel. I am using Developer edition. Basically my requirement is to add a form in my community where users can fill & submmit and get appropriate replies from the admin. My user role is Site administrator and I have enable Site.com Publisher User field on the user detail page.
-
- Case Manager
- December 01, 2014
- Like
- 1
- Continue reading or reply
Error: You can only select pages that are accessible by the Community Guest User.
Hi,
I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.

I have created a visualforce page for the community login, when I choose login page as my custom visualforce page I am getting error as displayed below.
Unable to set a VF page as Login page for my community.
I tried assigning all Profiles to that VF page but it still gave me the same error.
- Case Manager
- March 12, 2015
- Like
- 1
- Continue reading or reply
Is it possible to insert Record and Attachment at the same time using Data Loader?
I have a question related to Data Loader, is it possible to insert records from CSV file and corresponding attachments at the same time using Data Loader. If Yes, how is it possible? If Np, what are the alternatives?
- Case Manager
- January 30, 2015
- Like
- 0
- Continue reading or reply
Connect to UNIX server through an API
Is it possible to connect to a unix server from APEX code or an API? My requirement is to connect to a unix server and fetch a csv file and place it in my local directoy. Later using Data Loader I need to upload data from the fetched csv file. I do not want to user any third party connectors or applications.
- Case Manager
- January 21, 2015
- Like
- 0
- Continue reading or reply
Disable access to reports page from Home Page Component.
I have created a Home Page Component, in that compnent I have added a report using analytics:reportChart. Its displayed on the Home Page but when I click it, it is being redirected to the page where we can run the report/make changes. Is there any way to stop it from being redirected to another page.
Component - homeComp
<apex:component >
<analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:component>
HomePageComponent
<apex:page sidebar="false" showHeader="true" >
<c:homeComp />
</apex:page>
Component - homeComp
<apex:component >
<analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:component>
HomePageComponent
<apex:page sidebar="false" showHeader="true" >
<c:homeComp />
</apex:page>
- Case Manager
- December 11, 2014
- Like
- 0
- Continue reading or reply
Customize Flows in Visualforce Pages
Is there any way to customize Flow screens in vf pages? I know its possible using CSS styles but it is very complicated.
I have tried to customize using the information provided in the below page but it was not that much useful.
https://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_customize_runtime_ui.htm
Below is my sample code.
<apex:page >
<style>
.requiredInput{
display: table;
border-collapse: separate;
border-spacing: 5px;
}
.labelCol {
display: table;
border-collapse: separate;
border-spacing: 5px;
}
</style>
<flow:interview name="Survey" />
</apex:page>
I have tried to customize using the information provided in the below page but it was not that much useful.
https://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_customize_runtime_ui.htm
Below is my sample code.
<apex:page >
<style>
.requiredInput{
display: table;
border-collapse: separate;
border-spacing: 5px;
}
.labelCol {
display: table;
border-collapse: separate;
border-spacing: 5px;
}
</style>
<flow:interview name="Survey" />
</apex:page>
- Case Manager
- December 05, 2014
- Like
- 0
- Continue reading or reply
Unable to add Form to a Page using Site.com
I am trying to add a form to a page using site.com, Forms section is not avaialable in Site.com Page Elements Panel. I am using Developer edition. Basically my requirement is to add a form in my community where users can fill & submmit and get appropriate replies from the admin. My user role is Site administrator and I have enable Site.com Publisher User field on the user detail page.
- Case Manager
- December 01, 2014
- Like
- 1
- Continue reading or reply