• Jason Hardy
  • NEWBIE
  • 200 Points
  • Member since 2010
  • Hardy Computer Solutions


  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 59
    Replies
I started to build out a simple trigger from the  to prevent a File record from being deleted from SalesForce Files | Triggers. These file records can be deleted from a related list on a visualforce page. The trigger is active but I can still delete an uploaded File . Any ideas ? 
 
trigger CREContentDocVersion on ContentVersion (before delete) {
for(ContentVersion cv : trigger.old){
        cv.adderror('Document Cannot be deleted');
    }
}

 
Hello everyone! I'm not sure what happened but while doing the Reports and Dashboard module I realized that I have somehow created 2 SF Dev Orgs and they are not connected! There is one org that I can access through traihead and one that I can ramdonly connect through. When I went to download an app from AppExchange it downloaded into the one that is not connected to the Trailhead Playground. I don't know what to do because I can't connect to AppExchange with my Trailhead Playground. I've attached screenshots for a better understanding. I apprecaite ANY help you can give me (FYI I contacted Trailhead and they were no help at all! They suggested that I create a new playground, which doesn't address the iissue of the multiple Orgs that I seem to have). Please help!
User-added image
User-added image
User-added image
 trigger QueueTrigger on Sales_Product_Category__c (after insert, after update, after delete) {
   
    CustomTriggerSwitch__c ct = CustomTriggerSwitch__c.getValues('salescategory');
    
    if(ct == null || ct.Active__c || Sales_Product_Category__c.business_plan__c <> null || 
      Sales_Product_Category__c.ID <> null){ 
           
     
        List<Sales_Product_Category__c> salescategory = (Trigger.isDelete ? Trigger.old : Trigger.new);

        System.enqueueJob(new QuotaProductQueueable(salescategory,Trigger.oldMap));
}

}


The error is bolded :  Constructor not defined: [QuotaProductQueueable].<Constructor>(List<Sales_Product_Category__c>, Map<Id,Sales_Product_Category__c>)

What am I missing? 

 
I am learnig Apex coding using David Liu's Apex Academy and have a couple triggers on Case object 
WarrantySummary
CheckSecretInformation

All was well till I only had the WarrantySummary trigger but once I created the CheckSecretInformation trigger and try to insert/edit a case I get the error below ==> 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger CheckSecretInformation caused an unexpected exception, contact your administrator: CheckSecretInformation: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, WarrantySummary: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.WarrantySummary: line 5, column 1: []: Trigger.CheckSecretInformation: line 32, column 1


Can you please help ?

Regards
Pallavi
I want the column heading to say "Invoiced" for one group of people and "Actual Sales" for another group of people.  

            
                    <apex:column headerValue="Actual Sales" rendered={!if(!q.IsProcedural__c,true,false)}">
                        <apex:outputText value="{!q.Annual_Actual_Sales__c}" style="width:70px" />
                    </apex:column>

Now this is not rendering anything for anyone.  What am I doing wrong?

Hi there,

Is there a way to config permissions allowing users with 'Customer Community User' profile to be able perform DML on the CaseTeamMember object and select info from QueueSobject Objects.  I couldn't find anything that works under the profile 'Object Settings'.

I'm building VF pages that allow external customers to create a new case and add/remove Collaborators into/from their opened cases.

CaseTeamMember newCaseMember = new CaseTeamMember();
		newCaseMember.ParentId = caseId;
		newCaseMember.MemberId = cons[0].Id;
		newCaseMember.TeamRoleId = [SELECT Name, Id FROM CaseTeamRole WHERE Name =: 'Case Member'].Id;
		insert newCaseMember;
QueueSobject cOwner = [Select SobjectType, Queue.Id, Queue.Name, Id From QueueSobject Where Queue.Name =: 'Incoming Cases' limit 1];

Thank you,

 

I started to build out a simple trigger from the  to prevent a File record from being deleted from SalesForce Files | Triggers. These file records can be deleted from a related list on a visualforce page. The trigger is active but I can still delete an uploaded File . Any ideas ? 
 
trigger CREContentDocVersion on ContentVersion (before delete) {
for(ContentVersion cv : trigger.old){
        cv.adderror('Document Cannot be deleted');
    }
}

 
Hello everyone! I'm not sure what happened but while doing the Reports and Dashboard module I realized that I have somehow created 2 SF Dev Orgs and they are not connected! There is one org that I can access through traihead and one that I can ramdonly connect through. When I went to download an app from AppExchange it downloaded into the one that is not connected to the Trailhead Playground. I don't know what to do because I can't connect to AppExchange with my Trailhead Playground. I've attached screenshots for a better understanding. I apprecaite ANY help you can give me (FYI I contacted Trailhead and they were no help at all! They suggested that I create a new playground, which doesn't address the iissue of the multiple Orgs that I seem to have). Please help!
User-added image
User-added image
User-added image
Hello friends.  I just installed DREAMHOUSE App and I was trying to access any PROPERTY, when I got this message "Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Error ID: 120013661-373515 (473429469)".   

I installed and unistalled Dreamhouse as part of the exercises of the Trailhead, not sure if this is the reason of the issue.  Thank you for any help !!
I am working on the Process Automation Specialist Superbadge Step 2
I am working the following error message:
Challenge Not yet complete... here's what's wrong: 
Please check the configuration of the custom fields on the Account object. The formulas, rollup summaries, etc. did not produce the expected outcome.
Challenge Requirements:

Create validation rules and account formula fields as specified in the business requirements. Use the following field names.
For this metric or fieldUse this Field Name
Number of dealsNumber_of_deals__c
Number of won dealsNumber_of_won_deals__c
Last won deal dateLast_won_deal_date__c
Deal win percentDeal_win_percent__c
Amount of won dealsAmount_of_Won_Deals__c
Call for ServiceCall_for_Service__c

I have configure Call for Service , Deal win percent, Ammount of Won Deals as formula fields.  
Amount of won dealsAmount_of_Won_Deals__c
Call for ServiceCall_for_Service__c Seems to be working fine but I am not sure about the Deal win percent formula.
Please anyone can help me with this.
Hi,
      Please go through the below code once.

     start method query returns 200K reocrds
     execution method query returns 100K records

    Problem Description:
               If start method query returns 200K records and if I have batch size as 2K, my execute method runs 200 times.
               As I have another query in execute method, I hope it will be executed and processed 200 times as well.
               If the query in execute method runs and processes once, it should be fine for me.
               
               Is there any way to avoid this repetetion? Or I have to write a different batch apex to process  ?
               Also, can a query in execute method returns more than 50K records?
     
public class update_isTarget implements Database.Batchable<sObject>{
    public Database.queryLocator start(Database.BatchableContext bc){
        return Database.getQueryLocator('select id,ture_false__c from account where ture_false__c = true');
    }
    public void execute (Database.BatchableContext BC, List<account> accvals){
        List<Account> accountslist = new List<Account>([select id,ture_false__c from account where
                                                  id not in (select id from object2 where value__c='Y')
                                                  and ture_false__c = false]);

        for(Account a:accountslist){
         a.ture_false__c = true;
        }
		update accountslist;

        for(Account b:accvals){
            b.ture_false__c = false;
        }
        update accvals;
    }
    public void finish(Database.BatchableContext BC){
    }
}

Thanks for your time.
 
I want the column heading to say "Invoiced" for one group of people and "Actual Sales" for another group of people.  

            
                    <apex:column headerValue="Actual Sales" rendered={!if(!q.IsProcedural__c,true,false)}">
                        <apex:outputText value="{!q.Annual_Actual_Sales__c}" style="width:70px" />
                    </apex:column>

Now this is not rendering anything for anyone.  What am I doing wrong?
Challenge Not yet complete... here's what's wrong:  
The BoatReviews Apex controller's getAll() function doesn't return the right list of the fields from the BoatReview custom object.

I am getting the above error. 

I have'nt worked on this since before the Christmas Holiday but have spent most of the last two days trying to resolve this.

I have tried different playgrounds and hard-coding the results back from the Apex class.
I'm accessing Salesforce Using the PHP Toolkit (latest stable).

My client recently began storing images in a Rich Text Field and when querying this table I get the image as an <img src=*> tag.

These images won't display on the page and I cannot directly view the image by visiting the src URL of the image.

An example of the img tag is as follows (redacted):
 
<img alt="User-added image" src="https://c.na##.content.force.com/servlet/rtaImage?eid=####&amp;feoid=####&amp;refid=####" style="height: 375px; width: 500px;"></img>

I suspected a permissions issue but the client team rejected this suggestion and told me it was an implementation issue.

Ultimately what we would like to do is get the source image and save it on a separate image CDN.

Can anyone point me in the right direction?

 
I too am getting errors and cannot proceed. I end up getting this error message: "Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.StringException: Unrecognized base64 character: {"
I had done earlier modules with custom code so I figured removing those components/controller would help, plus, I tried switching out the email addresses in the Custom Settings for the Einstein Package - neither worked.
I'm Bummed! I was liking the Cat Rescue module! :( Hopefully Salesforce can figure out what's the blocker here.