Tuesday, January 17, 2017

Global Picklist: Some consideration before use

Global picklist is launched at Summer 16. It still in beta so there are known issues .
Known Limitations for Beta
  • The list of inherited values doesn’t appear directly on the detail page for a picklist that’s based on a global picklist; but you can click a link to view the picklist value set.
  • For custom picklist fields based on a global picklist, you can change from a single-select to multi-select picklist, and from a multi-select to single-select picklist. However, you can’t change the picklist to a different field type such as checkbox, currency, or text.


 I found some issue when trying to use it.

1 - Once you create custom picklist with Global Picklist value, there is no way to revert it as local picklist.We have to delete that custom picklist.

2 -If we decided to delete that Global Picklist and that Global picklist is used by custom field, there is no way to delete it.I tried to delete that custom field first and delete the Global Picklist, it still prompt me that if we have existing picklist.So I tried to deactivate -- but still we need to leave one value active.So I tried dare method: delete the custom object that contains custom picklist that use Global Picklist.IT STILL DOES NOT WORK.Based logic,if custom picklist is deleted, should it remove from the usage?

The section will bring you to deleted custom field.

3 -If we have existing custom picklist, we not able to convert it into Global Picklist.Pleave vote here .

Please let me know what do you think about picklist.Have you encounter the above issue, how you solve it.

Friday, January 06, 2017

Salesforce Developer Platform 1 Exam Question

Some of questions that may help you to study.It may not exactly same,but at least it gives an idea how the question look like.

Question 1: Which two valid ways of loading external java script ?
A- <apex:includescript>
B-<apex:define>
C-<script>
D-<link>

Question 2: A developer with 100 accounts execute following code in developer console.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Account myAccount1 = new Account(Name='My Account 1');
insert myAccount1;

for(Integer i=0;i<150;i++){
  Account newAccount=Account(Name='newAccount'+x);
try{
insert newAccount;
}
Catch(Exception e){
 System.debug('Exception happened');
}
}
Insert new Account(Name='My Last Account');

How many account in the organization after the code run?
A- 100
B-101
C-102
D-252

Question 3:A developer using Helper class to generate Account list as below.

1
List<Account> listAccount = Helper.generateAccount();
What code that developer should run in order to make some of the data are inserted although some data maynot be successfully inserted. 
A-insert listAccount
B-Database.insert(listAccount,false)
C-Database.insert(listAccount,System.ALLOW_PARTIAL)
D-Database.updateImmediate(listAccount)

Question 4:Which locations can custom Rollup Summary field can be created using standard object relationship.Choose 3.
A-Campain using Campain Member
B-Account using Opportunities
C-Opportunity using Opportunity Products
D-Account using Case
E-Quote using Order

Question 5:Good practices writing trigger
A- Use Map to hold query result
B-use Set to hold unique data
C-use @future for DML
D-use synchronize call out

Question 6: Given the code below .

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
public class myController {
public String myString;

public getMyString(){
   return getMyString;

}

public String getStringMethod1(){
   return myString;

}

public String getStringMethod2(){
if(myString==null)
   myString=Method2;
return myString;
}
What is the output in Visualforce below?
1
{!myString},{!StringMethod1},{!StringMethod2},{!myString}

Question 7:When the value of a field in account record is updated,which two(2) methods will update the value of custom field in all related Opportunities?
A- Cross field formula on Account
B- Workflow Rule on Account
C-Process Builder on Account
D-Apex Trigger on Account

Let me know the answer in comment below.Thanks and have a nice day.

Monday, January 02, 2017

How I pass Salesforce Developer Platform 1 Exam

I passed my Salesforce Developer Platform 1 exam on 30 Dec 2016.This  was my second attempt.I am glad at last , I got it over with a happy ending.

I am working in Salesforce since 2011 and I got to know Salesforce with self learning.Salesforce workbook, documentation ,Salesforce StackExchange and mr. Google are really helpful.

I fail at first try due to lack of preparation.Believe me, years of experience is not a ticket to pass.So I was really working hard on the second try.Here are my tips :

#1 Time
I took few months to sit for the second exam after my first attempt.It give me time to study.

#2 The guideline
Please take the Exam Guide seriously.I ticked the topic to indicate how many times I study the topic.I am lucky because I found the reference here , it explained the details on which topic that we should study.

#3 Making note
I made note on the topic that I studied and put it on the wall.Near my desk, near my bed,at door and mirror.Just to make sure I get to use with it everyday.

#4 Mock up Question
Well, I am referring quite a lot on mock up question.I will study the topic that asked by the question.For example if the question asking on Roll Up Summary , I will study the topic on Relationship in Salesforce.Memorize the the answer is not good.But reading the question/answer and  study the pattern is good.Honestly I feel the question is tricky.Sometimes I need to keep reading it to understand.

That's my tips.I will post some of questions that I remember and hopefully it will help your study.

Happy New Year.