• Rahul2505
  • NEWBIE
  • 0 Points
  • Member since 2012

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

A user has Read only Access to the account, will he be able to attach the File in the Attachment related list on a record?

Hello All,

 

  

<apex:page standardController="Account" >

<span class="st_sharethis" displayText="Share" st_url="http://sharethis.com" st_title="Sharing Rocks!"></span>

<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
stLight.options({
publisher: '090ca7f1-3e25-46bf-94b7-0781ad6f1371',
popup: 'true'
});
</script>

</apex:page>

 

 

     I cant see the button in my Account when I edited in the page layout of account.........If I save it as Html it is working fine....What should I do to work in VF page also

I have a failed Deployment in an inbound Change set:

AvoidDuplicateUsageEntry   Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

 

AvoidDuplicateUsageEntry is an Apex Trigger and the Code Coverage is 0%

This apex trigger was part of an RFP package from Salesforce labs that created a Custom Object named Questions. It has not failed before??

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
trigger AvoidDuplicateUsageEntry on Question__c (before insert) 
{
    for (Question__c question: Trigger.new)
    {
        if (question.Override_Warning__c == false)
        {
            try
            {
              Question__c[] q = [SELECT q.CreatedById, q.CreatedDate, q.Question__c from Question__c q where q.Response__c = :question.Response__c and q.RFP__c = :question.RFP__c ORDER BY CreatedDate desc];
              if (q.size() > 0)
              {
                  User u = [SELECT u.Name from User u where id = :q[0].CreatedById];
                  String questionStr = String.escapeSingleQuotes(q[0].Question__c);
                  questionStr = questionStr.replace('\"', '\\\"');
                  String userStr = String.escapeSingleQuotes(u.Name);
                  userStr = userStr.replace('\"', '\\\"');
                  String dateStr = q[0].CreatedDate.format('MM/dd/yyyy hh:mm a');
                  String errorJSON = 'var errorJSON = {timesUsed: ' + q.size() + ', question: \"' + questionStr + '\", user: \"' + userStr + '\", time: \"' + dateStr + '\"};';  
                  question.Response__c.addError(errorJSON);
              } // endif
            }
            catch (QueryException e)
            {
                // This is actually the non-error case.  The Question should not 
                // already exist.  Do nothing.
            }
        } // endif
    } // endfor
}

 

In any case, I can't seem to find out how to fix this failure so I can deploy my inbound change set.

 

I am a beginner and need a little help.

 

thanks!