Salesforce

An effort to bring a revolution in Salesforce.

Wednesday 3 August 2016

How to read text file from static resource Salesforce.

 Method to read Text File from static resource.

 
public String textFromSomeUniqueName {

    get {
        StaticResource sr = [
                select Body
                from StaticResource
                where Name = 'SomeUniqueName'
                ];
        return sr.Body.toString();
    }
}
, ,

New Quote button is not visible

Seems like an access issues, please follow below steps:
 
1. Go to Setup --> Profile
2. Open your profile, and scroll down to "Standard Object Permission".
3. Please check if you have "create" permission on Quote Object.

If above steps seems fine to you, please check below steps:
1. Go to Setup --> Opportunity
2. Open the layout assigned to you profile. (Check page layout setting for profile wise page layout)
3. Click on Related List, and scroll down to Quote related list.
4. Add standard button "new Quote" and hit save.

,

Tuesday 2 August 2016

Created Day of the Week formula

​CASE( MOD( datevalue(createddate) - DATE(1900, 1, 7), 7),
0, "Saturday",
6, "Sunday", "Weekday")

,

Monday 1 August 2016

OWD VS PROFILES

OWD - Controls Record Access.
Sharing Rule - Controls Record Level Access.
Profile - Object Level Access
 

 The user cannot edit the records for other user ( sharing rule will not be created, will give an error that profile is read only) . However they can see each others record.

See Link : http://salesforce.stackexchange.com/questions/60656/profile-permissions-v-s-org-wide-defaults


Profile works on object and OWD on record ( they are two different things ).
It won't be a good idea to say that profile over rides OWD. But yes, Profile level permisson have a high preference, hence Profile permission will stand.

Consider a case where
OWD - Private
Profile - Read /Write


In this case he users will not be able to edit each others record due to OWD being private.
, , , ,

Get Gmail, Docs, Drive, and Calendar for business