Ask Search:
Sean GrechSean Grech 
Hi 

I was hoping that someone may be able to help me.  The challenge is:

1) My client has an existing Salesforce environment. We would like to replicate it on a new Salesforce Instance.

2) There are some objects and apps that we don't need so is there anyway cloning the Salesforce environment without those?

3) When we clone will we have modify all data access? Or will the cloning repliacte existing profiles?

I understand there is some complexity here, however would greatly appreciate any expert advice.

Many Thanks in advance

Sean
Best Answer chosen by Sean Grech
Jeff MayJeff May
The Migration tool can be used to migrate metadata (configuration), but not the data.

There is no easy way to migrate data, since you'll need to add each record in the right order (and update all related records with the IDs of the newly created records they relate to).

In addition, CreatedDate and CreatedBy (audit fields) will be to be switch to 'editable' by Salesforce.

I strongly suggest that it will be safer, more reliable, and faster (more time efficient) to keep the data in the same org, and change the configuration to get the results needed.  You can use data jobs within the same org to move data around based on your design decisions, and you can use record types and page layouts to give your users a seemless experience while this is going on in the background.
Melissa HallMelissa Hall 
I've researched and tested permission sets, validations, and sharing settings for this issue, but for some reason none of those items will allow my users to create and edit by record type.

Scenario:
  • Group A needs to create, edit, and delete the Financials object when record type is Submission - Audited Financials
  • Group B needs to to create, edit, and delete the Financials object when record type is Submission - Non-audited Financials
  • Groups A & B need to create, edit, and delete the Financials object when record type is Moody's Ratings Review
So, in a nutshell, I need all users to read everything on the Financials object, but only select users can create and edit, based on record type.  Oh, and each record type is assigned to it's own page layout.

Solutions tried:
  • Validations: Group A's profile is set up to have CRE rights for the fields on the Financials object.  I've written a validation that will only allow them to edit when the record type is Submission - Audited Financials.  I cloned the validation to allow Group B to edit Submission - Non-audited Financials and cloned a third validation that allows Groups A & B to edit Moody's Ratings Review.  Still with me?
    • This solution gets the job done, but Group A can still create a page for Financials when record type is Submission - Non-audited Financials (aka the only record type they shouldn't create or edit), but when they try to save the record, the validation kicks in and won't allow them to save.
    • I don't want to frustate my users, but will use this as a last resort since it's the only thing working properly at the moment.
  • Permission Sets: I set all the profiles so that every user has read only access to the Financial's fields.   I created three permission sets that allowed the groups above to have CRE rights to their specified record type, and assigned my users to each permission set.
    • This solution does butt-kiss.  If I assign a user to one of the permission sets, they have CRE for every record type.  Ideas on where I'm going wrong?
Permission Set Screenshot
  • Sharing Settings: so I did even more research and discovered that Sharing Settings should be the path to go ... or so I thought.  
    • I set up a Public Group with users from Group A.  Set up my criteria-based sharing rules for Financials and ... Group A cannot edit Financials for any record type.
Sharing Settings Screenshot

Okay Salesforce gurus, can someone please help me figure out what I'm missing, and how to get my users set up to Create and Edit the Financials object by record type?  Thanks!
Best Answer chosen by Melissa Hall
Todd GillTodd Gill
Melissa,

I think you’re very close.  It's might be helpful to look at this scenario by separating a few security concepts:

1.  Allow read only or read/write access to records based on record type = controlled by OWD and Sharing Rules
2.  General ability to perform CRUD operations on records of an object IF sharing rules provide visibiltiy = controlled by Profiles and Permission Sets.

It gets tricky when OWD, sharing and profile settings overlap or appear to conflict with each other.

Record types settings in Profiles - When you restrict a profile so that it includes only a subset of record types for an object, you are really only restricting those users in what record types they can create or which record types they may use when changing the record type of a record they can edit.  However, the profile/permission set settings will not restrict a user from viewing additional record types that were created by others.

Permission Sets control basically the same settings as Profiles - Permission sets are basically just a way to add privileges to a more restrictive profile.  They control essentially the same privileges as profiles. They are used to selectively “opening up” profile-level settings for sub-sets of users. 

Also, remember that if a user's Profile or Permissions Set sets specific record type restrictions for an object, the user can still view all records assigned to any record type for that object as long as the user has visibility to the records via sharing rules.

So, based on what you've shared here, here is an approach that might be helpful:

Sharing Rules Settings
  - Set OWD on Financials to Public Read-Only
  - Create criteria-based sharing rule to give the Group A Read/Write access to Financials records with record type "Submission - Audited Financials" 
  - Create criteria-based sharing rule to give Group B Read/Write access to Financials records with record type "Submission - Non-Audited" 
  - Create criteria-based sharing rule to give Group A and Group B read/write to Financials records with record type "Moody's Ratings Review"

Profile Settings
  - CRUD: make sure members of Group A and Group B belong to Profiles (and/or to Permissions Sets - see below) that allow read, create, update, delete access to the Financials object, since they will need to be able to edit records they have Read/Write visibility to (based on sharing rules).  Make sure all other profiles besides Group A and B have read access to the Financials object.
  - Record types: Here, you can limit which type of record types may be created by each profile, or which record types a user may change a record to if they have read/write access to the record (based on sharing rules).  But again, this setting does not limit which record types may be viewed or edited.

I don't necessarily see a need for Permission Sets in the scenario described here, but they might apply based on other requirements.

I hope this helps!
Kim MoutesKim Moutes 
Good Morning,
I have two custom objects with a master-detail relationship. On the Master record, I have a User Lookup field. I would like to include this person in a workflow email alert being triggered by an action from the child object. Is this possible? Any help is much appreciated. Thank you!

Kim
Best Answer chosen by Kim Moutes
Sunil SarillaSunil Sarilla
Hi Kim,
Please do the below
Create a Custom Email field on the Child object
Now create a new field update action on the workflow that you have on the child object and update the custom email field with the email address of the user thats in the lookup field on the master object
the formula will be something like
MasterObject__r.RelatedUser__r. Email
use the insert field buton to navigate and get the email address
Child Object > Master Object . Related User > Email

Now edit the email alert action and select the email field as the recepient type and select the Custom Email field
 
Jen OlsenJen Olsen 
My company recently secured Qliksense for analytics. Can a Qlik dashboard be embedded in Salesforce?
Best Answer chosen by Jen Olsen
Stephen NoeStephen Noe
It looks like there is a Salesforce Connector available for Qlik > http://help.qlik.com/en-US/connectors/Subsystems/Salesforce_Connector_help/Content/13.0/Install-salesforce-connector.htm. You may want to reach our to Qlik directly to get more info around this product, or if they have further suggestions on integrating with Salesforce.
Desirae SlaughDesirae Slaugh 
On the task object I have two custom fields one text ( Stocking_Opportunity__c) and one pick list (Stocking_Priority__c) that I would like to have a validation rule that when a stocking opporunity is input into the text field, users are required to supply a stocking priority value from the picklist (High, Medium, Low)

My current formula is (but it is not working): 
IF( 
AND( 
NOT(ISBLANK(TEXT(Stocking_Priority__c ))), 
LEN( Stocking_Opportunity__c )=0),TRUE,FALSE)
Best Answer chosen by Desirae Slaugh
Deepak AnandDeepak Anand
Like this = 
AND( 
   NOT(ISBLANK(Stocking_Opportunity__c)), 
   ISBLANK(TEXT(Stocking_Priority__c))
)
Steve AndruszkaSteve Andruszka 
Hi All,

Is it possible to capitalize the first letter in a field?  The field is First Name.  I don't want to enforce this, but rather upon tabbing off the field, capitalize the first letter.  Similar to the Phone # fields, which automatically format.

Possible?  Thanks!
Best Answer chosen by Steve Andruszka
Deepak AnandDeepak Anand
Hey Steve,

With the assumption that you have Workflow Rules on your edition(with ref. to old questions), here you go:
  • Setup | Create | Workflows & Approvals | Workflow Rules.
  • New Rule.
  • Select the Object.
  • Evaluation Criteria: created and every time it's edited.
  • Rule Criteria: formula evaluates to true.
  • Formula:
AND(
    NOT(ISBLANK(FirstName)),
    OR(
        ISNEW(),
        ISCHANGED(FirstName)
    ),
    LEFT(FirstName, 1) <> UPPER(LEFT(FirstName, 1))
)
  • Save & Next.
  • From under Immediate Workflow Actions, click Add Workflow Action to select Field Update.
  • Select the Field to Update: FirstName.
  • Select User a Formula to Set the new Value.
  • Click Show Formula Editor.
  • Formula:
UPPER(LEFT(FirstName, 1)) &
MID(FirstName, 2, LEN(FirstName))
  • Save
  • Done
  • Activate
Best,
Deepak
Mark KeaneMark Keane 
Hi, I have three different profiles in my org and one user needs access to all the Accounts and Opportunities setup across the Org for a particular account/sites.
I have Sharing setup to share all Account starting with that Account name e.g. SalesForce to the Profile that user is a memebr of but how can I only share to that one user and nort all users in his profile ?
mark.
Best Answer chosen by Mark Keane
Derhyk DoggettDerhyk Doggett
Hi Mark,
A couple different ways you could accomplish this:
  1. Either through hierarchical sharing, or Role based Sharing rule - assuming the users are in different roles
  2. Sharing Rule to Share with a Public Group.Create a Public Group and add that one user to the group. Then create a sharing rule to share all Account records with that group. Tip: I would suggest naming the group in such a way it is obvious the intention is for sharing. example "Sharing Group - All Accounts" - as you will likely be creating more sharing groups in the future and this helps keep things organized.
Hope that helps.

https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_about_sharing_rules.htm

--Derhyk
Amit SinghAmit Singh 
Hi All, I am getting below error while checking challenge #6

There was an unhandled exception. Please reference ID: VQOSAPVU. Error: Faraday::ClientError. Message: MALFORMED_QUERY: When retrieving results with Metadata or FullName fields, the query qualifications must specify no more than one row for retrieval. Result size: 2

User-added image
Best Answer chosen by Amit Singh
Amit SinghAmit Singh
I have completed the challenge. What I did is created the same flow into another org and then checked the challenge and passed successfully.
Use below link for complete solution of the superbadge
http://faizanaz90.blogspot.in/2017/08/salesforce-trailhead-process-automation.html (http://faizanaz90.blogspot.in/2017/08/salesforce-trailhead-process-automation.html" target="_blank)
Peter KnollPeter Knoll 
Hey folks, I have a fair amount of experience with process and flows but am stumped if following can be met using these awesome tools:

If any account is marked as Inactive (prevously being Active), set status field on all related contacts to Inactive.
If account is marked back to Active, re-activate all Contacts but not the ones that have State = 'Archived'.

Can PB and Flows be used for this? 

 
Best Answer chosen by Peter Knoll
Mayank SrivastavaMayank Srivastava
Depending on how many contacts you have linked to an Account:

If no of Contacts > = 500 or 1000, use Apex
If not, use PB and Flows

Good luck!
Christine DesrosiersChristine Desrosiers 
I have one Price Book. Since there is no value added from the human input of selecting the Price Book, I would like to automate that selection.

Is it possible to use Process Builder to automate the selection of the Price Book when an Opportunity is created?
Best Answer chosen by Christine Desrosiers
Ajay DubediAjay Dubedi
Hi Christine,
You can write a Trigger that will automate the selection of default Pricebook when an Opportunity is created.
trigger PBTrigger  on Opportunity (before insert) {

     Pricebook2 sPB =  [select id,name from Pricebook2 where isStandard = true limit 1];
     list<opportunity> oplist = new list<opportunity>();
     if(sPB!=null)
{
         for(opportunity o:trigger.new){
             if(o.Pricebook2 == null){
                 o.PriceBook2Id =sPB.id;
                 oplist.add(o);
              }
            }
 }
update oplist;
}

Regards,
Ajay