• Sue Irvine 16
  • NEWBIE
  • 15 Points
  • Member since 2018
  • Salesforce Developer
  • Cornell University

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hi - I've created a LWC that works in the Outlook plug-in to find custom object records to relate an email message. It's working fine except I can only get a plain text version of the message body. I'm getting the messageBody attribute from the API in the LWC (as mentioned in the documentation) and sending it to my Apex controller. Is there a way to get the html version of the message? Thanks
Hello - I have a LWC with a RecordEditForm and want to set the value of a custom field to today's date upon submit, but can't get the right formatting in the Javascript submit handler. Everything I've tried gives me an invalid date format error. Can someone clue me in on the right format to use? Thanks!
 
handlesubmit(event){
        event.preventDefault();  
        console.log('handle submit');
        const fields = event.detail.fields;
        fields.Travel_Dates_Sent_to_PS__c = false;
        if (this.updatetype=="cancel"){
            let dt = Date.now();
            fields.Travel_End_Date__c=dt;
        }
        this.template.querySelector('lightning-record-edit-form').submit(fields);
    }

 
Hi all, I have a REST API endpoint set-up to receive a list of Id's (external ID on the Contact) for processing. I would like to be able to return a list of external ID's in this list, that don't exist in our Contacts. Although we currently have less that 50K Contacts, I know it won't be that way for much longer. This is what I'm doing currently:
List<String> badEmplids = new List<String>();
Set<Contact> allContacts = new Set<Contact>([select Cornell_id__c from Contact]);
Set<String> allConString = new Set<String>();
for (contact c : allContacts){
  allConString.add(c.cornell_id__c);
}
for (string s : emplidIds){
    if (! allConString.contains(s)){
        badEmplids.add(s);
     }
}
Am I missing something obvious? Ideally I would want to select from the LIST where the external id is not in the Contact.
Hello - I have a LWC with a RecordEditForm and want to set the value of a custom field to today's date upon submit, but can't get the right formatting in the Javascript submit handler. Everything I've tried gives me an invalid date format error. Can someone clue me in on the right format to use? Thanks!
 
handlesubmit(event){
        event.preventDefault();  
        console.log('handle submit');
        const fields = event.detail.fields;
        fields.Travel_Dates_Sent_to_PS__c = false;
        if (this.updatetype=="cancel"){
            let dt = Date.now();
            fields.Travel_End_Date__c=dt;
        }
        this.template.querySelector('lightning-record-edit-form').submit(fields);
    }

 
Hi all, I have a REST API endpoint set-up to receive a list of Id's (external ID on the Contact) for processing. I would like to be able to return a list of external ID's in this list, that don't exist in our Contacts. Although we currently have less that 50K Contacts, I know it won't be that way for much longer. This is what I'm doing currently:
List<String> badEmplids = new List<String>();
Set<Contact> allContacts = new Set<Contact>([select Cornell_id__c from Contact]);
Set<String> allConString = new Set<String>();
for (contact c : allContacts){
  allConString.add(c.cornell_id__c);
}
for (string s : emplidIds){
    if (! allConString.contains(s)){
        badEmplids.add(s);
     }
}
Am I missing something obvious? Ideally I would want to select from the LIST where the external id is not in the Contact.