• ifthikar Ahmed 1
  • NEWBIE
  • 130 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 14
    Replies
error : 
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.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Approval for deal more than $ 100K is must: []
Close errors


1.Validation rules :
User-added image
2.Approval process :

User-added imageUser-added imageUser-added image3.Process builder :

screet shot attached in next post

 
can a soql query return Boolean and string value ?
i am new to salesforce getting parssing error what is wrongwith my query 

select id,name (select id, name from Contacts) from Account where Name ='test6'
What are two uses of External IDS? Choose 2 answers
  1. To prevent an import from creating duplicate records using Upsert
  2. To identify the sObject type in Salesforce
  3. To create a record in a development environment with the same salesforce ID as in another environment
  4. To create relationships between records imported from an external system.
i am new and can some explain when to use DescribeFieldResult ,  DescribeSObjectResult ,Schema.SObjectType 
Hi I am trying to create a contact related record when a new account is created

trigger Createcontact on Account (before insert) {  
List<Contact> contactList=new List<Contact>();
    for (Account a : Trigger.new) {
    Contact c=new Contact();
    c.firstName=a.Name;
    c.lastName=a.Name;  
    contactList.add(c);
        // Iterate over each sObject
    }
  insert contactList;
}

the above trigger creates a new contact where in i want the contact to be related to the respective account
can we use trigger.old in after insert event ???

More over, my code is to create a new invoice record when the "active checbox" is selected true in the coustomer obj and the old value shuld be unchecked. event has to update evvent where in my trigger works fine in  after Insert how come pls explain

trigger test1 on Apex_Customer__c (after Insert) {
   list <APEX_Invoice__c> upinv = new list <APEX_Invoice__c>();
   for(Apex_Customer__c newcus : trigger.new)
   {
       
       
       if(newcus.APEX_Active__c == True && trigger.oldmap.get(newcus.id).APEX_Active__c != True )
       {
           APEX_Invoice__c newinv = new APEX_Invoice__c();
           newinv.APEX_Customer__c = newcus.Id;
           upinv.add(newinv);
       }
   }
insert upinv;
}

Additionally, if you update or delete a record in its before trigger, or delete a record in its after trigger, you will receive a runtime error. This includes both direct and indirect operations. For example, if you update account A, and the before update trigger of account A inserts contact B, and the after insert trigger of contact B queries for account A and updates it using the DML update statement or database method, then you are indirectly updating account A in its before trigger, and you will receive a runtime error.

can some one help me understan with an example pls
error : 
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.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Approval for deal more than $ 100K is must: []
Close errors


1.Validation rules :
User-added image
2.Approval process :

User-added imageUser-added imageUser-added image3.Process builder :

screet shot attached in next post

 
can a soql query return Boolean and string value ?
Hi I am trying to create a contact related record when a new account is created

trigger Createcontact on Account (before insert) {  
List<Contact> contactList=new List<Contact>();
    for (Account a : Trigger.new) {
    Contact c=new Contact();
    c.firstName=a.Name;
    c.lastName=a.Name;  
    contactList.add(c);
        // Iterate over each sObject
    }
  insert contactList;
}

the above trigger creates a new contact where in i want the contact to be related to the respective account

Additionally, if you update or delete a record in its before trigger, or delete a record in its after trigger, you will receive a runtime error. This includes both direct and indirect operations. For example, if you update account A, and the before update trigger of account A inserts contact B, and the after insert trigger of contact B queries for account A and updates it using the DML update statement or database method, then you are indirectly updating account A in its before trigger, and you will receive a runtime error.

can some one help me understan with an example pls
Hi..
i am new to salesforce ,

in visual force , while using controller to get the object fields from an object 2 typs of methods are used 
1.
public Account getAccount() {
       return account; 
  }

2.
public Account account { get; private set; }
does they both do the same job and which place we hv to go with the 1st method and for which place do we have to go with 2nd  , pls explain
 
I am working on the App Customization Specialist Superbadge and this one has me baffled. Here is the part I'm stuck on...

Quick Self Sign Up
Maria asked for a quick way for users to sign themselves up for a Shift directly from a Volunteer Shift record. Your solution was an action with the label Sign Me Up. To keep it simple there should be no fields on the pop-up. Instead the action automatically sets the Volunteer to the user clicking the button, changes the status to Confirmed, and assigns the currently viewed Shift as the new record's Volunteer Shift. Once the action is done show the friendly message "Congratulations, you are signed up!".

Based on what I'm reading, they seem to be asking me to create a Quick Action button that creates a new record with the necessary fields set to default values. The problem is that two of the fields that are required are Lookups that I was required to create in the first challenge. One to supply the User Name and another to supply the Volunteer Shift Name. Quick Action default values can't populate Lookup fields, right? I tried creating a flow, but you can't trigger an autolaunched flow from a Quick Action, only Screen Flows. The challenge wants one button click and it's done. Can someone tell me what I'm missing here?