• Sushil Kumar Verma
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Developer
  • Cloud Certitude Pvt Ltd

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Showing different DateTime on the detail page and when we are fetching records via SOQL:
1. Create a record like a task object record
2. open task detail page and check created date
3. open the developer console and do SOQL on created task with created date
How can i run my lightning app with myDomain in winter-16 release.I do not know how to use myDomain in URL.
Please help me.

Hi All,
I am badly stuck at a point where I need help from the Community.


I have visualforce email template with custom vf component. The email is send using apex code by a guest user. I get below error while whenever guest user tries to send email using a site page -

INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []

public static void sendSurveyNotification(list<Feedback_Survey__c> feedbacks) {
        //try {           
        	if(feedbacks!=null && feedbacks.size()> 0) {               
                //Fetching the email template
                Id emt_notify;
                Id emt_completed;
                list<EmailTemplate> emts = [Select Id, Name, DeveloperName From EmailTemplate where DeveloperName 
                                            IN ('C_SAT_Survey_Request_Notification','C_SAT_Survey_Completed_Notification') LIMIT 2];
                
                if(emts[0].DeveloperName == 'C_SAT_Survey_Request_Notification') {
                    emt_notify = emts[0].id;
                    emt_completed = emts[1].id;
                }
                else {
                    emt_notify = emts[1].id;
                    emt_completed = emts[0].id;
                }
                list<Messaging.SingleEmailMessage> messages = new list<Messaging.SingleEmailMessage>();
                
                for(Feedback_Survey__c fbk: feedbacks) {
                    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                   	if(fbk.C_SAT_Status__c == 'Initiated')
                    	mail.setTemplateId(emt_notify);
                    else
                        mail.setTemplateId(emt_completed);
                    
                    mail.setTargetObjectId(UserInfo.getUserId());
                    System.debug('Taget Object Id==>'+UserInfo.getUserId());
                    mail.setWhatId(fbk.Id);
                    System.debug('fbk id==>'+fbk.id);
                    mail.setTreatTargetObjectAsRecipient(false);
                    list<String> ccaddresses = new list<String>{(String)fbk.Transaction_Manager_Email__c, (String)fbk.Survey_Requester_Email__c};
                    mail.setCcAddresses(ccaddresses);
                    mail.setToAddresses(new list<String>{(String)fbk.Real_Estate_Manager_Email__c});
                    mail.setOrgWideEmailAddressId(system.label.Org_Wide_TM_Support);
                    System.debug('Org Wide Address==>'+system.label.Org_Wide_TM_Support);
                    mail.setSaveAsActivity(false);
                    messages.add(mail);
                }
                Messaging.sendEmail(messages);
            }
        /*}
        Catch(Exception e) {
            System.debug('Error ==>' +e.getMessage());
            System.debug('Line Number ==>' +e.getLineNumber());
            System.debug('Cause ==>'+e.getCause());
            System.debug('Cause ==>'+e.getStackTraceString());
        }*/
    }

Thanks in Advance...!!
How can i run my lightning app with myDomain in winter-16 release.I do not know how to use myDomain in URL.
Please help me.