• Tyler Brooks 16
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
Hello all,
I am sure this has been asked/answered but I am having a heck of a time finding an applicable post so here it goes.
I have several custom objects that have the 'Account' as a lookup or master object. I would liek to create a Lightning COmponent on the App pages for these objects that will show me a list of the contacts related to that account. Ideally it would be one component that could be used on multiple objects, but if I need one for each custom object that is fine.  Any and all assistance is very appreciated!
Cheers all and happy weekend!
Hello all,
I am trying to create a button on an object that will open a FormAssembly form, prepopulating several fields from the object into it. Then it will create a new object as a child of the first.

I found something like this for sending an email template out, 
<a href="formURL?tfa_co={!Lead.Company}&tfa_LeadId={!Lead.Id}">Please click here to take our survey.</a>

COuld this convert to a button on my record page? I am a new(er) admin on my own and I've never done a button or FormAssembly before.
 
Happy Friday all,
I m scratching my head here and hoping someone has an answer.
I have a custom text field on object A, that is then a TEXT formula reference on Object B. The field is populated with a name. Sometimes, the name entered is a user in our org. When it IS the name of a user, I need to update the OwnerID of Object B with that Users ID.  
Any and all assistance is much appreciated!
Good morning Trailblazers!
I'm sure this is answerd somewhere but I have been searching for some time and must not be using the right keywords so here it goes!

I have an object(B) that gets created and associated to object(A) with a lookup. I also have object(C) that gets created and associated to (A).

What I need to do is automatically show the related list for Object(B) on Object(C) 's Page Layout.  
I read some posts saying Apex trigger, but feel like it should be a bit easier than that.

Please advise and thank you in advance!

Regards,
Tyler
Hello all,
I am sure this has been asked/answered but I am having a heck of a time finding an applicable post so here it goes.
I have several custom objects that have the 'Account' as a lookup or master object. I would liek to create a Lightning COmponent on the App pages for these objects that will show me a list of the contacts related to that account. Ideally it would be one component that could be used on multiple objects, but if I need one for each custom object that is fine.  Any and all assistance is very appreciated!
Cheers all and happy weekend!
Hi, I'm trying to implement auto creation trigger of contacts for all incoming email to case emails. It should auto create the contact if the contact is not in our system.

The auto creation features works in sandbox and production. However, our agents are not allowed to create a new case in production. Does anyone know why I am getting this error? Thank you for your help!

Here is the error message when creating a new case:
Error Message when creating a new case

Here is the code we used:
trigger TriggertoCreateContactformCase on Case (before insert) {
    List<String> UseremailAddresses = new List<String>();
    //First exclude any cases where the contact is set
    for (Case c:Trigger.new) {
        if (c.ContactId==null &&
            c.SuppliedEmail!=''|| c.SuppliedEmail==null)
        {
            UseremailAddresses.add(c.SuppliedEmail);
        }
    }

    //Now we have a nice list of all the email addresses.  Let's query on it and see how many contacts already exist.
    List<Contact> listofallContacts = [Select Id,Email From Contact Where Email in:UseremailAddresses];
    Set<String> ExstingEmails = new Set<String>();
    for (Contact c:listofallContacts) {
        ExstingEmails.add(c.Email);
    }
    
    Map<String,Contact> emailToContactMap = new Map<String,Contact>();
    List<Case> casesToUpdate = new List<Case>();

    for (Case c:Trigger.new) {
        if (c.ContactId==null &&
            c.SuppliedName!=null &&
            c.SuppliedEmail!=null &&
            c.SuppliedName!='' &&
           !c.SuppliedName.contains('@') &&
            c.SuppliedEmail!='' &&
           !ExstingEmails.contains(c.SuppliedEmail))
        {
            //The case was created with a null contact
            //Let's make a contact for it
            String[] Emailheader = c.SuppliedName.split(' ',2);
            if (Emailheader.size() == 2)
            {
                Contact conts = new Contact(FirstName=Emailheader[0],
                                            LastName=Emailheader[1],
                                            Email=c.SuppliedEmail
                                            );
                emailToContactMap.put(c.SuppliedEmail,conts);
                casesToUpdate.add(c);
            }
        }
    }
    
    List<Contact> newContacts = emailToContactMap.values();
    insert newContacts;
    
    for (Case c:casesToUpdate) {
        Contact newContact = emailToContactMap.get(c.SuppliedEmail);
        
        c.ContactId = newContact.Id;
    }
}

Here is the Apex class we used:
 
@isTest
public class Test_CreateContactFormCase {
    
     static TestMethod  void createData()
     {
           contact c = new contact(FirstName='test',LastName='contact94',Email='abctest@123.com'); 
           insert c;
            case cse1 = new case(subject='Test',suppliedEmail='abctest@123.com',suppliedName='TestUser1');
            insert cse1;
            case cse2 = new case(subject='Test',suppliedEmail='abctest94@123.com',suppliedName='Test User2');
            insert cse2;
     }       
    

}

 
  • August 19, 2019
  • Like
  • 0
I got this message when trying to complete my App Customization Specialist superbadge in a new DE on step 2.

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: FPAJLFRQ
I'm able to handle the auto-populate piece.  but I'm running into a problem with creating a new Project without coming from an Opportunity.  I'm getting an error thats not allowing me to create the new Project.
This is also a required field when another field has a certain selection made.
Hello all,
I am trying to create a button on an object that will open a FormAssembly form, prepopulating several fields from the object into it. Then it will create a new object as a child of the first.

I found something like this for sending an email template out, 
<a href="formURL?tfa_co={!Lead.Company}&tfa_LeadId={!Lead.Id}">Please click here to take our survey.</a>

COuld this convert to a button on my record page? I am a new(er) admin on my own and I've never done a button or FormAssembly before.
 
Good morning Trailblazers!
I'm sure this is answerd somewhere but I have been searching for some time and must not be using the right keywords so here it goes!

I have an object(B) that gets created and associated to object(A) with a lookup. I also have object(C) that gets created and associated to (A).

What I need to do is automatically show the related list for Object(B) on Object(C) 's Page Layout.  
I read some posts saying Apex trigger, but feel like it should be a bit easier than that.

Please advise and thank you in advance!

Regards,
Tyler