• Iram Malik
  • NEWBIE
  • 25 Points
  • Member since 2015
  • Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi,

I am facing a very unusual issue:
I have a VF page which is displaying data From object Z and object Y. When New button is clicked, the data from Object Z is fetched and dispalyed in pageblocktable in VF. When Update button is clicked, the data from Object Z and object Y are displayed.
Now my issue is, on Update, if there are more then 1 record in Object Y, the rows except for the 1st row are duplicated. When I create debug log for a user, the data is displayed correctly for that user but if I remove the debug log, the duplicate issue appears again for the user. This is happening for all the users.

I don't know how and why debug log is impacting my VF page. I tried using Set as as well but it didn't help. I don't think my list is holding any duplicate value in controller; rather only on VF Page.
Kindly help me.

Thank you,
Iram Malik
Hi,
We are not able to connect to the SFA Acceptance server from Nashville server and getting connection time out error.
Can anyone please tell me what may be the reason?

Thanks in advance.

trigger AccountTrigger on Account (after insert, after update) {


    for(Account acc : Trigger.new){

accountShare as1=[SELECT id, AccountaccessLevel,RowCause,userorgroupid from accountShare where accountid=:acc.id and rowcause='Rule'];

        AccountShare accountShare = new AccountShare();
        accountshare.RowCause='Rule';  
     //   userorgroupid =''
        accountShare.AccountAccessLevel = 'All';
        update accountshare; 
    }

 

   

}
A company gives very limited access to Account Record Type "Inner Circle". If a user search accounts they should be able to view a list of account including "Inner circle" accounts. If a standard user i.e. Bob click on account with Record Type "Inner Circle" the record will not be displayed by default, but an approval process should start. Administrator can thereafter choose to give Bob access to specific account or declining request. 
What the best approach to solve this problem? 
Hello,

This is the trailhead questions which I am trying to solve :

Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.


Here is my code :

public class StringArrayTest {
    public static List <String> generateStringArray (Integer n) {
       List<String> List1 = new List<String> ();
        for(Integer i=0;i<n;i++) {
          List1.add('\'Test'+ i+'\'' );
  }
        System.debug(List1);
        return List1;
    } 

}


I am getting following error :

Challenge not yet complete... here's what's wrong: 
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.


I tried it many times but I am not able to solve this problem. Please help.