• md saif ansari
  • NEWBIE
  • 4 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
@RestResource(urlMapping='/Widgets/*')
global with sharing class WidgetController {
    @HttpGet
    global static string doGet() {
        RestRequest req = RestContext.request;
        String FirstName = req.params.get('FirstName');
        String LastName = req.params.get('LastName');
        String Phone = req.params.get('Phone');
        String Email = req.params.get('Email');
        Lead ld = new Lead();
        ld.FirstName = FirstName;
        ld.LastName = LastName;
        ld.Phone = Phone;
        ld.Email = Email;
        ld.Company = 'FAP Form';
        insert ld;        
        return 'success....';
    }    
}
which two Apex data types can be used to reference a salesforce record ID dynamically?
Choose 2 answers
a) External ID.
b) Subject.
c) ENUM.
d) String.
@RestResource(urlMapping='/Widgets/*')
global with sharing class WidgetController {
    @HttpGet
    global static string doGet() {
        RestRequest req = RestContext.request;
        String FirstName = req.params.get('FirstName');
        String LastName = req.params.get('LastName');
        String Phone = req.params.get('Phone');
        String Email = req.params.get('Email');
        Lead ld = new Lead();
        ld.FirstName = FirstName;
        ld.LastName = LastName;
        ld.Phone = Phone;
        ld.Email = Email;
        ld.Company = 'FAP Form';
        insert ld;        
        return 'success....';
    }    
}
Hi All ,
How to pass <lightning:select > and <lightning:input > values from child component to parent component 
i'm preparing the data on child component (user UI from with mutiple rows) and i have save button on parent component , when i'm click on save button  all the input field values need to bring from child component to parent ,i'm using component event but values are not getting....
I am getting error message while solving this challenge in Trailhead :

To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.
The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)

Error Message is :  There was an unhandled exception. Please reference ID: HKIZNLVZ. Error: Trailhead::TrailheadTimeOut. Message: Trailhead.view: failed to get a 200 response. Made 3 attempts each resulting in a 403 or 500 failure for url challenges?key=%5B%22trailhead.challenge.validation_rules.en.us.192%22%5D.

I am not sure what went wrong here.
My Validation Rule is on Contact Object  :

  AND ( NOT(ISBLANK( Account.Name)),
( MailingPostalCode <> Account.ShippingPostalCode))

Can anyone please help with this.