Manpreet Singh
IndividualForum Replies Created
-
Manpreet
MemberApril 26, 2018 at 4:53 pm in reply to: How to detect in which Salesforce environment I am working?Hi Pranav,
With Spring 16 release, we are getting new values added to the existing $User.UITheme Global variable and to the UserInfo.getUiTheme() method which will help us to identify the current user's UI mode.
here's the list of possible values
Theme1 — Obsolete Salesforce theme
Theme2 — Salesforce Classic 2005 user interface theme
Theme3 — Salesforce Classic 2010 user interface theme
Theme4d — Modern “Lightning Experience” Salesforce theme
Theme4t — Salesforce1 mobile Salesforce theme
PortalDefault — Salesforce Customer Portal theme
Webstore — Salesforce AppExchange theme
hopefully we can use this in Workflows, Validations, Formulas, Apex & Visualforce..Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:51 pm in reply to: How to Reload Page after an action using Javascript in Salesforce?Hi pranav,
You need to do something like this :
<apex:commandButton action="{!onSave}" id="savex" value="Save" styleClass="slds-button slds-button--brand" onComplete="refreshPage();"
function refreshPage(){
window.location.top.reload();
alert('Setting Saved');
}Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:50 pm in reply to: How to handle mixed DML Exception in salesforce?Hi pranav,
Whenever you are getting this error it means that two Sobjects(setup & non-setup) that your using in your code can not mix during the same transactions.To avoid this use the the System.runAs block or the @ future method.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:49 pm in reply to: How can I refresh OutputPanel through JQuery in Salesforce?Hi pranav,
OutputPanel Refresh using jquery :
<script>
jQuery('#someId').click(function(){
// do your stuff
....
// Now call action function
refreshMyPanel();
});
</script><apex:actionFunction name="refreshMyPanel" reRender="MyPanel" />
<apex:outputPanel id="MyPanel">
....
</apex:outputPanel>Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:46 pm in reply to: Salesforce Remote Action not working in JavaScript?Hi saurabh,
The problem is because you're uploading the javaScript file via static resource, but all {!####} expressions are been compiled on page load and not in the static resource.You need to Add the remote action name as a hidden input field on the page, like this:
<input id="remote_action" type="hidden" value="{!$RemoteAction.MSSPageController.updateHopscotch}"/>
And then fetch the value of the input by the Id and pass it to the remote manager.Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:44 pm in reply to: Cannot Access Campaign Field from Lead Object Record in SalesforceHi pranav,
This field is not accessible if you query a Lead object using API. User can get the details by querying CampaignMember object through API.
List<CampaignMember> cms=[SELECT CampaignID, LeadID, Status FROM CampaignMember WHERE CampaignID =: CampaignID__c];
Set<ID> LeadIDs= new Set<ID>();
FOR(CampaignMember cm:cms){
if(LeadIDs.contains(cm.LeadID)==FALSE){
LeadIDs.add(cm.LeadID);
}
}Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:44 pm in reply to: How to hide setup and show developer console in Salesforce?Hi saurabh,
If you disable "View Setup and Configuration " to hide setup then"View all data" will also get disabled.
and this is disabling the devloper console as well as "View All Data" is required for it.Below are the permision required for developer console :
To use the Developer Console: “View All Data”
To execute anonymous Apex: “Author Apex”
To use code search and run SOQL or SOSL on the query tab: “API Enabled”
To save changes to Apex classes and triggers: “Author Apex”
To save changes to Visualforce pages and components: “Customize Application”
To save changes to Lightning resources: “Customize Application”
so It is not possible to hide setup and show developer console.Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:43 pm in reply to: URL Navigation in salesforce classic vs lightningHi pranav,
You need to use the following script to differ salesforce classic from lightning environment :
<script>
function homeBtn(){if( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) {
// Lightning navigation - Salesforce navigateToURL
sforce.one.navigateToURL('/home/home.jsp');
}
else {
// Set the window's URL using a Visualforce expression
window.location.href = '/home/home.jsp';
}
}
</script>Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:39 pm in reply to: Report filters created in Lightning become locked in target environment when the report is deployed?Hi saurabh,
You need to Edit the report in lightning Experience.If you edit hte filters you will see a locked checkbox.Make sure it is checked.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:38 pm in reply to: How to Remove Enter Functionality from InputFields in a Salesforce Visualforce Page?Hi pranav,
Add the following script to your Visualforce Page:
<script type='text/javascript'>
function stopRKey(evt)
{
var evt=(evt) ? evt : ((event) ? event : null);
var node=(evt.target)?evt.target:((evt.srcElement)?evt.srcElement:null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}document.onkeypress = stopRKey;
</script>Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:37 pm in reply to: How can i get the Reminder Field when creating a Task from Case Object in Salesforce?Hi pranav,
You will have to create a new Quick Action under Case Object.Create new custom field under Activity custom fields of data type datetime(this field will populate the original REminder field via process builder).In the Process builder populate the standard Reminder field with the custom one and REminder set with boolean true.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:32 pm in reply to: How to Fetch more than 50k records using SOQL in Salesforce?Hi saurabh,
Normally, queries for a single Visualforce page request may not retrieve more than 50,000 rows. In read-only mode, this limit is relaxed to allow querying up to 1 million rows.
<apex:page controller="SummaryStatsController" readOnly="true">
<p>Here is a statistic: {!veryLargeSummaryStat}</p>
</apex:page>The controller for this page is also simple, but illustrates how you can calculate summary statistics for display on a page:
public class SummaryStatsController
{
public Integer getVeryLargeSummaryStat()
{
Integer closedOpportunityStats =
[SELECT COUNT() FROM Opportunity WHERE Opportunity.IsClosed = true];
return closedOpportunityStats;
}
}Thanks.
-
Hi saurabh,
Your users will need the "Customize Application" permission to update custom settings records. They vary a bit differently than a typical custom object, in that they aren't dependent on field level security or profiles.
setup > Manage Users > Profiles
Look for customize Application under Administrative Permissions.Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:29 pm in reply to: How to Perform actions on the Case based on the owner Type in Salesforce?Hi saurabh,
This can be achieved very simply by using Owner.Type in your SOQL Query.
List<Case> caseRec = [SELECT Id,CaseNumber,OwnerId,Owner.Name,Owner.Type FROM Case];
for(Case c:caseRec)
{
if(c.Owner.Type=='User')
{
//your functionality
}
}Possible values of Owner.Type are,
1. User
2. QueueThanks.
-
Manpreet
MemberApril 26, 2018 at 4:28 pm in reply to: What is the Action attribute of apex:page for initialization in Salesforce?Hi saurabh,
The reason that we don't suggest doing initialization there is because we don't promise that your controller methods will fire in any particular order, other than that your constructor will be called first.If you want to do initialization you should do it in the constructor of your controller, since that will happen when the instance of the class is created. The action attribute is really only useful for redirecting, specifically conditional redirecting.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:27 pm in reply to: apex:actionSupport is not working for apex:inputField in Salesforce. Why?Hi pranav,
If apex:actionSupport is not working for apex:inputField, use apex:actionRegion.
Sample Code:
<apex:actionRegion>
<apex:inputField value="{!opportunity.stageName}" id="pb">
<apex:actionSupport event="onBlur" rerender="table" status="status"/>
</apex:inputField>
</apex:actionRegion>Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:26 pm in reply to: Not able to create new campaign in my Salesforce Org?Hi saurabh,
You need to check that the loggedin user, the Marketing user checkbox is checked.After that you new button will be visible on the campaign Object.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 4:25 pm in reply to: Are Managed Package test class coverage is included in you overall Salesforce org's coverage?Hi Pranav,
Test coverage issue is not because of Managed package. for managed package you don't need to write any test classes to get test coverage.
Thanks.
-
Manpreet
MemberApril 26, 2018 at 6:28 am in reply to: How do we train new and existing users on how to use the database applications in Salesforce?Hi ven,
Salesforce has provided the learning platform known as Trailhead with very detailed examples..You can we train your users from there itself.Following is the link of it : https://trailhead.salesforce.com/en/home
Thanks.
-
Manpreet
MemberApril 26, 2018 at 6:22 am in reply to: Does Salesforce integrate with IVR Guru (dialer)?Hi Abhay,
Whenever you need to do integrations with IVR Systems you first require details of the CTI adapter from their provider.
Kindly refer to the following link:
http://wiki.developerforce.com/page/CTI_Toolkit
Thanks. -
Manpreet
MemberApril 25, 2018 at 2:27 pm in reply to: Unable to see newly created fields in my Custom Report Type in SalesforceHi saloni,
You need to add those fields in the Page Layout of that custom Report type to make then visible in the Report Editor.
Go to Quick find box in your org and search for Report Types.
Thanks. -
Manpreet
MemberApril 25, 2018 at 2:21 pm in reply to: How can I increase the Standard Date field year Range in Visualforce?Hi Saloni,
Add the following script to your visualforce Page :$(document).ready(function() {
var startYear=2000;
var endYear=2050;
var optionsString='';
if(startYear -
Manpreet
MemberApril 25, 2018 at 2:15 pm in reply to: When I switch to Salesforce Lightning Experience I am unable to see Zultys softphone?Hi saurabh,
Try to check again your "Call Center Definiton" XML file. I think It miss an attribute " reqSalesforceCompatibilityMode" which determnies where your softphone is visible. To display your softphone in the both mode, set the value "Classic_and_Lightning" to this attribute.
Thanks. -
Manpreet
MemberApril 25, 2018 at 2:01 pm in reply to: What are the Salesforce callout limits for twilio messages when processed in bulk?Hi saurabh,
"Twilio consume 1 API call for 1 SMS".If you want to send like 200 SMS in bulk dataloader update you have to make 200 API calls so you will have to use future calls to handle this.
Thanks. -
Manpreet
MemberApril 25, 2018 at 10:39 am in reply to: Need help finding Salesforce Apps for building a pipeline workflow.Hi Jeffrey,
You can check out Process Comoser App on AppExchange.Following is the link for the same :
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N300000058f6JEAQ
Thanks.