• Caleb Kuester 27
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 15
    Replies
Greetings!

I have an EmailMessage trigger where, given any insertion of an EmailMessage, I'm looking to get the ContentDocumentIds from each message (attachments), The problem is that the ContentDocumetnId fields are blank on EmailMessage trigger. Trigger.new has a list of EmailMessage records with blank ContentDocumentIds.

The twist is that, in the Execute Anonymous window, if I query for the EmailMessage objects and corresponding ContentDocumentIds by their Ids, they have ContentDocumentIds.

As my application is specifically relevant to the Case record (Case records created by Email-to-Case), I have also attempted to reach them after the Case records were created, given this should be way after the EmailMessage records are fully created, but this is a problem because, at this stage, EmailMessage records do not have their parentId fields populated with the case, even after insert.

I feel like I am missing something silly, but I can't figure out what that is. Google only has maybe two relevant results and they are different enough to not be useful.

Hey guys: I'm getting an error on my scratch org when I run the force:source:pull/push commands on my Mac terminal.

The error is: 

(node:1196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 response listeners added. Use emitter.setMaxListeners() to increase limit

Tried:

  • It happens in a brand new scratch org that I created for troubleshooting this issue.
  • It happens after uninstalling/reinstalling SFDX
  • It happens when I install using npm.
  • At some point in my scratch org, I noticed a "Logged in too many times" error, so upon checking my login history for one attempt, I get 75 login attempts within a minute's timeframe.

This started happening fairly recently, as I have been working in my scratch org for the past month. It only started yesterday.

It doesn't happen when I run sfdx force:org:list. I get the expected list of several orgs.

Has anybody else come across this?

I am trying to deploy an utility class by adding a small method. The method implementation is below.
public static boolean isId(String strValue) {                                  
        return strValue InstanceOf Id;                                                  
    }
When I try the option "Deploy to Source Org", I am getting the following error message.
 
19:53:04.627 Starting Deploy (Beta)
When retrieving results with Metadata or FullName fields, the query qualificatio​ns must specify no more than one row for retrieval. Result size: 2

Has anyone experienced this? In my package.xml, I only have few apex classes and nothing else.

Can someone help?


 
  • May 21, 2020
  • Like
  • 0
I have to create the login page with User name and password in lightning 

I have created the fields, but I have this error when I enter invalid password or username.

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read property 'login__c' of null] Callback failed: apex://LoginController/ACTION$getressource Failing descriptor: {markup://c:login}

Can you please help me in this.

Login controller.js
({
    doInit : function(component, event, helper) {
        
    },
    
 
    loginPage : function(component, event, helper) {
         var userid = component.get("v.Empiduser"); 
        var pass= component.get("v.Empidpwd");
        
        var action = component.get("c.getressource");
        
            action.setParams({
              username:userid,
              userpassw:pass
        });
    
         action.setCallback(this,function(response){  
           if($A.util.isEmpty(userid ) || $A.util.isUndefined(userid )){
            alert('Please Enter User Name!');
          return ;
        }   
          if($A.util.isEmpty(pass) || $A.util.isUndefined(pass)){
            alert('Please Enter Password!');
           return;
        } 
        var login= response.getReturnValue().login__c ;
          var password= response.getReturnValue().password__c;
         var role= response.getReturnValue().Role__c;
             
          
             if (login==userid && password==pass &&role=="Scrum Master")
              {
           const myEvent = component.getEvent('firstEvent');
            myEvent.setParams({ username: userid });
            myEvent.fire();
              }
             else if ((login==userid && password==pass &&role=="Developer"))
             {
                 const myEvent = component.getEvent('firstEvent');
            myEvent.setParams({ username: userid });
            myEvent.fire();
             }
             else if ((login==userid && password==pass &&role=="Product Owner"))
             {
                 const myEvent = component.getEvent('firstEvent');
            myEvent.setParams({ username: userid });
            myEvent.fire();
             }
             
             else 
             {
                 
                 alert("echec");
             }
         
          });
         $A.enqueueAction(action);
        
      
    },   
         
    
   
})
class Apex

public class LoginController {
    @auraEnabled
    public static Ressource__c getressource(String username,String userpassw ){
       return ([SELECT login__c,Name,password__c,Role__c,Tel__c FROM Ressource__c where login__c=:username and password__c=: userpassw]);
    }
 
    
}
Regards,
Mariem 
Hi Team,

I am calling apex class from constrctor but while debugging i am getting below error and cursor is not going inside setCallback method. It seems it is not calling apex class. Below is code:

Error is:
his page has an error. You might just need to refresh it. Action failed: c:BeerExplorer$controller$handleCompEvents [Invalid key search] Failing descriptor: {c:BeerExplorer$controller$handleCompEvents}

Controller code:

({
    handleCompEvents : function(component, event, helper) {
        var searchParam=event.getParam('searchText');
        var action=component.get('search');
        action.setParams({
            txtSearch:searchParam
        });
        
        action.setCallback(this,function(response){
            var state=response.getState();
            if(state=='SUCCESS')
            {
                var responseValue=response.getReturnValue();
                console.log('responseValue',responseValue);
            }
        })
    }
})

Apex Class: 
public class BeerExplorer {

    @AuraEnabled
    public static List<Beer__c> search(string txtSearch)
    {
        string likeParam='%' + txtSearch + '%';
        string query= 'select Id, Name, From Beer__c where Name Like: likeParam ';
        List<Beer__c> beerList=Database.query(query);
        return beerList;
    }
    
}
 
I have two Objects.
when a record is created in Object1 and hold the status field picklist value as Started then, I want to create 3 records in Object2 . How can I achieve this?
How to display multiple line toast messages? 
Write a trigger on Opportunity LineItem , when Line Item is deletes, delete an opportunity as well.?
Hi All,

Help me this, how to display records in lightning web components.using <table> tag.. import from apex class..

Thanks, Sesha.

Hey guys: I'm getting an error on my scratch org when I run the force:source:pull/push commands on my Mac terminal.

The error is: 

(node:1196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 response listeners added. Use emitter.setMaxListeners() to increase limit

Tried:

  • It happens in a brand new scratch org that I created for troubleshooting this issue.
  • It happens after uninstalling/reinstalling SFDX
  • It happens when I install using npm.
  • At some point in my scratch org, I noticed a "Logged in too many times" error, so upon checking my login history for one attempt, I get 75 login attempts within a minute's timeframe.

This started happening fairly recently, as I have been working in my scratch org for the past month. It only started yesterday.

It doesn't happen when I run sfdx force:org:list. I get the expected list of several orgs.

Has anybody else come across this?

Hi,

I'm currently working with the "Discover Built-in XSS Protections in Force.com" Unit of Developer Advanced Trail. The point of the challenge is to edit the comments below each use of "{!sampleMergeField1}" to determine if is vulnerable to XSS. 

Based on the criteria found within the unit and in the guidelines in the Secure Coding Cross Site Scripting page for Built in Auto Encoding (All merge-fields are always auto HTML encoded provided they: do not occur within a <style> or <script> tag, AND do not occur within an apex tag with the escape='false' attribute) I came up with the following answers:
<apex:page controller="Built_In_XSS_Protections_Challenge" sidebar="false" tabStyle="Built_In_XSS_Protections_Challenge__tab">
<apex:sectionHeader title="Built-In XSS Protections Challenge" />
<apex:form >
    <apex:pageBlock >
        <c:Classic_Error />
        <apex:pageMessages />      
        <apex:pageBlockSection title="Demo" columns="1" id="tableBlock">          
            
            <apex:outputText value="{!sampleMergeField1}"/>
            <!-- sampleMergeField1 is vulnerable to XSS: NO -->


            <apex:outputText value="{!sampleMergeField2}" escape="false"/>
            <!-- sampleMergeField2 is vulnerable to XSS: YES -->


            <apex:outputText >
                {!sampleMergeField3}
            </apex:outputText>
            <!-- sampleMergeField3 is vulnerable to XSS: NO -->
       
       
            <style>
                .foo {
                    color: #{!sampleMergeField4};
                }
            </style>
            <!-- sampleMergeField4 is vulnerable to XSS: YES -->
             
            
            {!sampleMergeField5}
            <!-- sampleMergeField5 is vulnerable to XSS: NO -->
            
            
            <script>
                var x = '{!sampleMergeField6}';
            </script>
            <!-- sampleMergeField6 is vulnerable to XSS: YES -->
            
            
            <apex:outputLabel value="{!sampleMergeField7}" escape="false"/>
            <!-- sampleMergeField7 is vulnerable to XSS: YES -->
            
       
        </apex:pageBlockSection>
        <apex:pageBlockSection title="Code links" columns="1">
            <apex:outputPanel >
                <ul>
                    <li><c:codeLink type="Visualforce" namespace="security_thail" name="Built_In_XSS_Protections_Challenge" description="Visualforce Page"/></li>            
                    <li><c:codeLink type="Apex" namespace="security_thail" name="Built_In_XSS_Protections_Challenge" description="Apex Controller"/></li>
                </ul>
            </apex:outputPanel>        
        </apex:pageBlockSection>        
    </apex:pageBlock>          
</apex:form>

But everytime y check the challenge, the same message is displayed:

User-added image

I already checked that I am pointing to the right playground. 

If you can check it and help find where I am going wrong I would be thankful.

Thanks


 
my org create first app and some error are occure
now code is Here......
<aura:application >
<ul class="slds-timeline">
  <li>
    <div class="slds-timeline__item">
      <span class="slds-assistive-text">Task</span>
      <div class="slds-media">
        <div class="slds-media__body">
          <div class="slds-media slds-timeline__media slds-timeline__media_task">
            <div class="slds-media__figure slds-timeline__icon">
              <div class="slds-icon_container slds-icon-standard-task" title="task">
                <svg class="slds-icon slds-icon_small" aria-hidden="true">
                  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#task"></use>
                </svg>
              </div>
            </div>
            <div class="slds-media__body">
              <div class="slds-media">
                <div class="slds-media__figure">
                  <span class="slds-checkbox">
                    <input type="checkbox" name="options" id="checkbox-351">
                    <label class="slds-checkbox__label" for="checkbox-351">
                      <span class="slds-checkbox_faux"></span>
                      <span class="slds-form-element__label slds-assistive-text">mark-complete</span>
                    </label>
                  </span>
                </div>
                <div class="slds-media__body">
                  <h3 class="slds-truncate" title="Review proposals for EBC deck with larger team and have marketing review this">
                    <a href="javascript:void(0);">Review proposals for EBC deck with larger team and have marketing review this</a>
                  </h3>
                  <ul class="slds-list_horizontal slds-wrap">
                    <li class="slds-m-right_large">
                      <span class="slds-text-title">Contact:</span>
                      <span class="slds-text-body_small">
                        <a href="javascript:void(0);">Lei Chan</a>
                      </span>
                    </li>
                    <li class="slds-m-right_large">
                      <span class="slds-text-title">Assigned to:</span>
                      <span class="slds-text-body_small">
                        <a href="javascript:void(0);">Betty Mason</a>
                      </span>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="slds-media__figure slds-media__figure_reverse">
          <div class="slds-timeline__actions">
            <p class="slds-timeline__date">Feb 24</p>
            <button class="slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small" aria-haspopup="true" title="More Options for Task, Review proposals">
              <svg class="slds-button__icon" aria-hidden="true">
                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
              </svg>
              <span class="slds-assistive-text">More Options for Task, Review proposals</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </li>
  <li>
    <div class="slds-timeline__item">
      <span class="slds-assistive-text">Event</span>
      <div class="slds-media">
        <div class="slds-media__body">
          <div class="slds-media slds-timeline__media slds-timeline__media_event">
            <div class="slds-media__figure slds-timeline__icon">
              <div class="slds-icon_container slds-icon-standard-event" title="event">
                <svg class="slds-icon slds-icon_small" aria-hidden="true">
                  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#event"></use>
                </svg>
              </div>
            </div>
            <div class="slds-media__body">
              <h3 class="slds-truncate" title="Company One — EBC Meeting">
                <a href="javascript:void(0);">Company One — EBC Meeting</a>
              </h3>
              <p class="slds-truncate" title="Let’s get together to review the theater’s layout and facilities. We’ll also discuss potential things that truncate at a certain width.">Let’s get together to review the theater’s layout and facilities. We’ll also discuss potential things that truncate at a certain width.</p>
              <ul class="slds-list_horizontal slds-wrap">
                <li class="slds-m-right_large">
                  <span class="slds-text-title">Time:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">Feb 23, 2015 11:00am–12:00pm</a>
                  </span>
                </li>
                <li class="slds-m-right_large">
                  <span class="slds-text-title">Location:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">300 Pike St, San Francisco CA</a>
                  </span>
                </li>
                <li class="slds-m-right_large">
                  <span class="slds-text-title">Name:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">Lei Chan</a>,
                    <a href="javascript:void(0);">Jason Dewar</a>,
                    <a href="javascript:void(0);">Gwen Jones</a> and
                    <a href="javascript:void(0);">Pete Schaffer</a>
                  </span>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="slds-media__figure slds-media__figure_reverse">
          <div class="slds-timeline__actions">
            <p class="slds-timeline__date">Feb 24</p>
            <button class="slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small" aria-haspopup="true" title="More Options for Event, Company One">
              <svg class="slds-button__icon" aria-hidden="true">
                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
              </svg>
              <span class="slds-assistive-text">More Options for Event, Company One</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </li>
  <li>
    <div class="slds-timeline__item">
      <span class="slds-assistive-text">Call</span>
      <div class="slds-media">
        <div class="slds-media__body">
          <div class="slds-media slds-timeline__media slds-timeline__media_call">
            <div class="slds-media__figure slds-timeline__icon">
              <div class="slds-icon_container slds-icon-standard-log-a-call" title="call">
                <svg class="slds-icon slds-icon_small" aria-hidden="true">
                  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#log_a_call"></use>
                </svg>
              </div>
            </div>
            <div class="slds-media__body">
              <h3 class="slds-truncate" title="Mobile conversation on Monday">
                <a href="javascript:void(0);">Mobile conversation on Monday</a>
              </h3>
              <p class="slds-truncate" title="Lei seemed interested in closing this deal quickly! Let’s move.">Lei seemed interested in closing this deal quickly! Let’s move.</p>
              <ul class="slds-list_horizontal slds-wrap">
                <li class="slds-m-right_large">
                  <span class="slds-text-title">Name:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">Lei Chan</a>
                  </span>
                </li>
                <li class="slds-m-right_large">
                  <span class="slds-text-title">Assigned to:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">Betty Mason</a>
                  </span>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="slds-media__figure slds-media__figure_reverse">
          <div class="slds-timeline__actions">
            <p class="slds-timeline__date">Feb 24</p>
            <button class="slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small" aria-haspopup="true" title="More Options for Call, Mobile conversation">
              <svg class="slds-button__icon" aria-hidden="true">
                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
              </svg>
              <span class="slds-assistive-text">More Options for Call, Mobile conversation</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </li>
  <li>
    <div class="slds-timeline__item">
      <span class="slds-assistive-text">Email</span>
      <div class="slds-media">
        <div class="slds-media__body">
          <div class="slds-media slds-timeline__media slds-timeline__media_email">
            <div class="slds-media__figure slds-timeline__icon">
              <div class="slds-icon_container slds-icon-standard-email" title="email">
                <svg class="slds-icon slds-icon_small" aria-hidden="true">
                  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#email"></use>
                </svg>
              </div>
            </div>
            <div class="slds-media__body">
              <h3 class="slds-truncate" title="Mobile conversation on Monday">
                <a href="javascript:void(0);">Mobile conversation on Monday</a>
              </h3>
              <p class="slds-truncate" title="Hi guys, Thanks for meeting with the team today and going through the proposals we saw. This goes on until it’s truncated.">Hi guys, Thanks for meeting with the team today and going through the proposals we saw. This goes on until it’s truncated.</p>
              <ul class="slds-list_horizontal slds-wrap">
                <li class="slds-truncate_container_50 slds-m-right_large slds-grid">
                  <span class="slds-text-title">To:</span>
                  <span class="slds-text-body_small slds-m-left_xx-small slds-truncate" title="Lei Chan with Long Name that might go on for quite some distance futher than you might expect">
                    <a href="javascript:void(0);">Lei Chan with Long Name that might go on for quite some distance futher than you might expect</a>
                  </span>
                  <span class="slds-no-flex slds-text-body_small"> + 44 more</span>
                </li>
                <li class="slds-m-right_large">
                  <span class="slds-text-title">From:</span>
                  <span class="slds-text-body_small">
                    <a href="javascript:void(0);">Jason Dewar</a>
                  </span>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="slds-media__figure slds-media__figure_reverse">
          <div class="slds-timeline__actions">
            <p class="slds-timeline__date">Feb 24</p>
            <button class="slds-button slds-button_icon slds-button_icon-border-filled slds-button_icon-x-small" aria-haspopup="true" title="More Options for Email, Mobile conversation">
              <svg class="slds-button__icon" aria-hidden="true">
                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#down"></use>
              </svg>
              <span class="slds-assistive-text">More Options for Email, Mobile conversation</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </li>
</ul>
</aura:application >

AND ERROR MSG is User-added image
I am attempting to complete the Execute SOQL and SOSL Queries in the Developer Console Basics module and the challenge is creating logs that have nothing to do with the SOSL inline query that is requested. I have executed the following code in the Execute anonymous window and the challenge still does not show as completed.
 
List<List<sObject>> searchList = [FIND 'Mission Control' IN ALL FIELDS 
                                  RETURNING Contact(FirstName, LastName,
                                  Phone, Email, Description)];
Contact[] searchContacts = (Contact[])searchList[0];

for (Contact c : searchContacts) {
   System.debug(c.LastName + ',' + c.FirstName);
}

So even with the above the challenge still returns with an error of:
 
Challenge Not yet complete... here's what's wrong: 
Could not find the contact's name in the debug log. Be sure to run a query for your record, and to write your contact's name to the debug log using the System.debug() method.

 
Hi all, I am stuck on the prevent SOQL injection trailhead, where I am looking to determine which portions of the code I would need to invoke escapeSingleQuotes or whitelist to enable. I've made several attempts at investigation to little avail. I have appended my code are there any steps I would need to take. My goal is to assess the code to see how it works and what I would need to do.

Hope it helps.
 
public class Prevent_SOQL_Injection_Challenge {

    public string textOne {get; set;}
    public string textTwo {get; set;}
    public string comparator {get; set;}
    public string numberOne {get; set;}

    public List<Supply__c> whereclause_records {get; set;}


    public PageReference stringSearchOne(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(textOne != null && textOne!=''){
                whereClause += 'name like  \'%'+textOne+'%\' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }


    public PageReference stringSearchTwo(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(textTwo != null && textTwo!=''){
                whereClause += 'Storage_Location__r.name like  \'%'+textTwo+'%\' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }


    public PageReference numberSearchOne(){
        string query = 'SELECT Id,Name,Quantity__c,Storage_Location__c,Storage_Location__r.Castle__c,Type__c FROM Supply__c';
        string whereClause = '';

        if(numberOne != null && comparator != null){
            whereClause += 'Quantity__c '+comparator+' '+numberOne+' ';
        }

        if(whereClause != ''){
            whereclause_records = database.query(query+' where '+whereClause+' Limit 10');
        }

        return null;
    }

}

 
Hello everyone I could use some help on the using future Methods trailhead. Please keep in mind I am not an Apex coder at all but I am trying to learn as much as I can.

Here is the Task

Create an Apex class with a method using the @future annotation that accepts a List of Account IDs and updates a custom field on the Account object with the number of contacts associated to the Account. Write unit tests that achieve 100% code coverage for the class.
Create a field on the Account object called 'Number_of_Contacts__c' of type Number. This field will hold the total number of Contacts for the Account.
Create an Apex class called 'AccountProcessor' that contains a 'countContacts' method that accepts a List of Account IDs. This method must use the @future annotation.
For each Account ID passed to the method, count the number of Contact records associated to it and update the 'Number_of_Contacts__c' field with this value.
Create an Apex test class called 'AccountProcessorTest'.
The unit tests must cover all lines of code included in the AccountProcessor class, resulting in 100% code coverage.
Run your test class at least once (via 'Run All' tests the Developer Console) before attempting to verify this challenge.

I have written an Apex class and a Test class but I think I am doing them both Wrong: because when I try to check the challenge i Get this error

Challenge Not yet complete... here's what's wrong: 
The 'AccountProcessorTest' test class doesn't appear to be calling the 'AccountProcessor.countContacts' method between Test.startTest() and Test.stopTest().


When I run the Test class I get this error :

System.QueryException: List has no rows for assignment to SObject

Here is the CLASS:
 
public class AccountProcessor {
     @future

  public static void someFutureMethod(List<id> scope) {

   Account[] updates = new Account[] {};
        for (AggregateResult ar : [
                select AccountId a, count(Id) c
                from Contact
                where AccountId in :scope
                group by AccountId
                ]) {
            updates.add(new Account(
                    Id = (Id) ar.get('a'),
                    Number_of_Contacts__c = (Decimal) ar.get('c')
                    ));
        }
        update updates;
    }

}

Here is the Test Class:
 
@IsTest
public class AccountProcessorTest {
  public static testmethod void TestAccountProcessorTest() {
 
Test.startTest();
     Account a = new Account();
        a.Name = 'Test Account';
        Insert a;
      
      Contact cont = New Contact();
      
      cont.FirstName ='Bob';
      cont.LastName ='Masters';
      cont.AccountId = a.Id;
      Insert cont;

    Test.stopTest() ;
     Contact ACC = [select AccountId from Contact where id = :a.id LIMIT 1];

 
        System.assert(Cont.AccountId != null);
        System.assertequals(cont.id, ACC.AccountId);

  }}

I have used alot or diffrent google searches to get me this far. But I have not Idea if Im even remotly close to the right answer or not.