• Nikhil dev 2
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I need to generate a random string of 100 char where 0 (zero) should repeat 20 times means out of 100 char string, 20 should be zero.

I am using below code to genearte random string, how can I leverage to get the solution, or if anyone have any other solution. 
Integer len = 100;
final String chars = '0123456789';
String randStr = '';
while (randStr.length() < len) {
   Integer idx = Math.mod(Math.abs(Crypto.getRandomInteger()), chars.length());
   randStr += chars.substring(idx, idx+1);
}

 

Hi All,

We are working on a scenario where we need to display the approval history related list on a VF page.
However, it displays the approval history related list along with the "Reassign | Approve/Reject" link in the action column for users who are not authorized to access the claim other than submitting it.
Below is the screenshot where the users who submits the claim can go and approve or reject the claim.(Which shouldn't be the case.)
I have tried creating a new profile with limited permissions to test it, yet the issue persists.
Can anyone please highlight the mistake that i am doing?
(Note : We have used an approval process which will take care of the approval or rejection.)

Approve reject appearing in approval history for unauthorized users