Gaurav Bhatia
IndividualForum Replies Created
-
Gaurav
MemberMay 24, 2016 at 3:06 pm in reply to: How do I get a selectList in my VF page for a custom case controller to work?Hi
Please use this, hope it will help you.<apex:page>
<apex:pageBlock >
<apex:pageBlockSection >
<apex:selectList value="{!orderFieldStaff}" size="1" label="Field Staff" onchange="first()">
<apex:selectOptions value="{!fieldStaff}" >
</apex:selectOptions>
</apex:selectList>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>Thanks
`public string orderFieldStaff{get;set;}
public ListfieldstaffList{get;set;}
public ListgetfieldStaff(){ system.debug('@@enter++++++');
fieldstaffList = new List(); Schema.DescribeFieldResult fieldResult = Order.field_staff__c.getDescribe();
List
ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry f : ple)
{
fieldstaffList.add(new SelectOption(f.getLabel(),f.getValue()));
}
return fieldstaffList;
}` -
Gaurav
MemberMay 24, 2016 at 10:48 am in reply to: Use of @IsTest versus testMethod and location of test methods in classesisTest annotation is used to define classes and methods that only contain code used for testing your application. The isTest annotation on methods is equivalent to the testMethod keyword.
Classes defined with the isTest annotation don't count against your organization limit of 3 MB for all Apex code.
Classes and methods defined as isTest can be either private or public. Classes defined as isTest must be top-level classes.
example for private class :-
@isTest
private class MyTestClass {
// Methods for testing
@isTest static void test1() {
// Implement test code
}
@isTest static void test2() {
// Implement test code
}
}example for public class :-
@isTest
public class TestUtil {
public static void createTestAccounts() {
// Create some test accounts
}
public static void createTestContacts() {
// Create some test contacts
}
} -
Please follow these steps:-
1. From Setup, enter Mobile Administration in the Quick Find box, then select Salesforce1 Settings and verify that Salesforce1 access is enabled for your organization.
2. For automatic access to the Salesforce1 mobile browser app while accessing the community, select Salesforce1 User on each external user record. (Salesforce1 User is automatically t turned on for internal users when the mobile browser app is enabled.)
Without this setting, external users with communities licenses must append /one/one.app to the community URL (for example, https://universaltelco.force.com/customer/one/one.app) to use Salesforce1.
3.For access via the Salesforce1 downloadable apps, grant the “API Enabled” profile permission to external users with communities licenses.
4. Communities that use the Salesforce Tabs + Visualforce template are supported in all of the Salesforce1 apps.
5. Communities that use a Community Builder template, such as Koa, Kokua, or Napili, contain rich styling that doesn’t display in Salesforce1. Templated communities are responsive and it’s best to access them directly from a mobile browser using community URLs.
6. External users who belong to multiple communities or users from your organization who also belong to one or more communities can use the drop-down menu at the top of the Salesforce1 navigation menu to access communities. -
Hi Sourabh,
The problem is that the pdf renderer engine does not support CSS3 as of yet, so you can't use styling of word-wrapping on your pdf.
-
Hi Shubham
you can Automate the approval prcoess with the help of process builder. Just do is create a New process on Opportunity in the process builder with the entry criteria 'Fire Custom Apprvoal' checkbox true and in the Immediate Actions create new 'Submit for Approval' Action.
- This reply was modified 8 years, 8 months ago by Gaurav.
-
Gaurav
MemberMarch 23, 2016 at 7:17 am in reply to: Standard lookup is not showing search results on the basis of custom field in Salesforce?Hi Utsav
For this you need to enable the Enhanced Lookups functionality.
search setting->enable the Enhanced lookup for specfic object.please try, this will help you.
-
Hello Shubham,
You can Try adding this code to your trigger.
trigger checkEmail on Contact (before insert,after insert,before update) {
List<Contact> conList = [select Email,Type__c from contact];
Integer counter = 0;
for(Contact conToInsert : Trigger.New)
for(Contact conToInsert1 : Trigger.New){
if(conToInsert.Email == conToInsert1.Email)
conToDelete.add(conToInsert);
counter++;
if(counter>1)
conToInsert.addError('Same Email Found Cannot Insert');
}for(Contact conToInsert : Trigger.New){
for(Contact conToCompare : conList){
if(conToInsert.Type__c == 'Type 4' ){
conToInsert.addError('Contact Cannot be Type 4');
}
else{
if(conToInsert.Email != null){
if(conToInsert.Email == conToCompare.Email){
conToInsert.addError('Same Email Found Cannot Insert');
}
}}
}
}}
I hope this will help you.