• prodi
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I am looking at various ways view field-level level security for a given profile across all objects/fields that a profile has access to. I've used the Force.com IDE to download profile metadata files and need some help understanding this:

A Child field of a Master-Detail relationship is listed as "hidden" in the metadata xml file, but within salesforce is set as "visible" for that profile/object/field combination. Fields which are not child fields of a master-detail relationship are listed as "hidden" only when they are not visible for the profile/object/field combination. 

Code:
<!--Both the master-detail field and the non-master-detail field have the hidden attribute
even though the master-detail field visibility is checked for this profile/object/field combination-->

<fieldLevelSecurities>
<editable>false</editable>
<field>object__c.field__c</field>
<hidden>true</hidden>
</fieldLevelSecurities>
 
What does "hidden" really mean within profile metadata file?
How can I view field level security across all objects/fields for a given profile? Is this possible?
  • November 21, 2008
  • Like
  • 0
I've had this issue for quite awhile but just assumed it was working as designed. But since I can't find any references on it in documentation, I thought I'd post here to be sure. Is this a bug or by design?

Running test cases which insert records into an object with an autonumber field cause the autonumber value to actually increment by the number of records inserted during the testmethod execution. After the test is complete, inserting a new record will result in an out-of-sequence autonumber value to be set on the new record. In other words, the autonumber values aren't rolled back during test execution.

In this simple example below the test method inserts 5 records into a custom object called "Book". The custom object contains a field called "Book Id" which is an autonumber field. After running this, the next record that is inserted into the Book object will have a Book Id 5 greater than the previously inserted record.

Code:
public class MyBookClass{

    public static void CreateNewBooks(List<String> titles){
        
        List<Book__c> booksToInsert = new List<Book__c>();
        
        for(String title : titles){
            Book__c b = new Book__c();
            b.Name = title;
            booksToInsert.add(b);
        }
        
        insert booksToInsert;
    }
    
    public static testmethod void CreateNewBookTest(){
        List<String> titles = new List<String>{'Title 1','Title 2','Title 3','Title 4','Title 5'};
        
        CreateNewBooks(titles);
        
        Integer count = [SELECT count() from Book__c where name in ('Title 1','Title 2','Title 3','Title 4','Title 5')];
        
        System.AssertEquals(5, count );
    }

}

 

  • November 11, 2008
  • Like
  • 0

Hi,

Our corporation instance of salesforce enterprise has been updated to winter 11, however when I click on my user name and go to system log, the old system log appears.

 

What do I need to do in order to enable the new one?

 

Thanks in advance!

  • October 11, 2010
  • Like
  • 0