• Roy Sourav
  • NEWBIE
  • 20 Points
  • Member since 2019
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 7
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 3
    Replies
We are facing issues with Lightning Message Service. We are using a LWC component in experience builder which publishes the message using LMS. Please find below error message while publishing the message.

Error details
Error details



We are using all standard code as per the below documentation - 

1. we have subscribed to the message channel in our community.
import SAMPLECHANNEL from '@salesforce/messageChannel/SampleMessageChannel__c';
2. we have imported the pusblishMessage , MessageContext.
import { publish, MessageContext } from 'lightning/messageService';
3. We have also use the wire context.
 @wire(MessageContext) messageContext;
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_message_channel


Need help from the Ohana community..!! Please help..!!

Hi All, 

I am using an experince cloud site with LWR template. In the site I wish to provide chat option to my customers leveraging Einstien chatbot. I have already created the bot and configured the Embedded services deployment settings. 

Now, I want to use the Embedded service chat component available OOTB on the experince cloud builder. But in LWR template I cannot see the "Embedded service chat" component. 

I skimmed through the documentation of LWR and Embedded Service but couldn't find a limitation. 

Can someone please help if I am missing on something or if there is a workaround to this?

Below is the screenshot from my LWR site builder.

User-added image

I am new to LWC and wanted to solidify my understanding with slots. Can someone help me with some good use cases of slots. That can be achieved in a better way with slots rather than passing data to child.

Thanks in advance.
LWC - type of communication we should use

Scenario - we have two child components (siblings) inside a container/parent component. Now if the two siblings want to communicate between each other, what's the best possible way -

1. Pubsub
or
2. Child 1 fires a custom event and the parent again passes the required data to child 2 ? If possible , is this a good practice? 

Please let me know the best practices here. Thanks in advance.

 

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...!!

When I am trying to open default scratch org from VS Code terminal. I am getting below error. Can some assist on this.

C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\json.js:27
        throw errors_1.JsonParseError.create(error, data, jsonPath);
        ^
JsonParseError: Unexpected end of JSON input
    at Function.create (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\errors.js:49:20)
    at Object.parseJson (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\json.js:27:39)
    at args.map.arg (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:548:53)
    at Array.map (<anonymous>)
    at _filter (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:500:17)
    at Logger.addFilter.args (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:96:37)
    at bunyan.filters.forEach (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:456:61)
    at Array.forEach (<anonymous>)
    at Logger.applyFilters (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:456:33)
    at Logger.fatal (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:450:32)
    at EventEmitter.Logger.uncaughtExceptionHandler (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:72:18)
    at EventEmitter.emit (events.js:194:15)
    at process.Logger.lifecycle.process.on.err (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:481:51)
    at process.emit (events.js:189:13)
    at process._fatalException (internal/bootstrap/node.js:496:27)
16:26:16.97 sfdx force:org:open ended with exit code 7

Hi All,

I have a vf page that is rendererd as MS-excel using the contenttype attribute in <apex:page>. In the vf page I have several <select> tags (html tag).

Now when i try to style the select tags, it doesnt reflect in the excel sheet while the sytling is fine when i render it as page. (see below screenshots)

when rendered as excel - 
User-added image

when rendered as page-
User-added image

Please help..!! Thanks for the Support..!! 
While adding metdata records to my change set. I am selecting the metadata name in the component type drop down and it throws me below error.

Unexpected error loading components:
Error: Error retrieving items list. Please retry. (1)


User-added image
Please help..!!
We are facing issues with Lightning Message Service. We are using a LWC component in experience builder which publishes the message using LMS. Please find below error message while publishing the message.

Error details
Error details



We are using all standard code as per the below documentation - 

1. we have subscribed to the message channel in our community.
import SAMPLECHANNEL from '@salesforce/messageChannel/SampleMessageChannel__c';
2. we have imported the pusblishMessage , MessageContext.
import { publish, MessageContext } from 'lightning/messageService';
3. We have also use the wire context.
 @wire(MessageContext) messageContext;
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_message_channel


Need help from the Ohana community..!! Please help..!!

Hi All, 

I am using an experince cloud site with LWR template. In the site I wish to provide chat option to my customers leveraging Einstien chatbot. I have already created the bot and configured the Embedded services deployment settings. 

Now, I want to use the Embedded service chat component available OOTB on the experince cloud builder. But in LWR template I cannot see the "Embedded service chat" component. 

I skimmed through the documentation of LWR and Embedded Service but couldn't find a limitation. 

Can someone please help if I am missing on something or if there is a workaround to this?

Below is the screenshot from my LWR site builder.

User-added image

When I am trying to open default scratch org from VS Code terminal. I am getting below error. Can some assist on this.

C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\json.js:27
        throw errors_1.JsonParseError.create(error, data, jsonPath);
        ^
JsonParseError: Unexpected end of JSON input
    at Function.create (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\errors.js:49:20)
    at Object.parseJson (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\kit\lib\json.js:27:39)
    at args.map.arg (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:548:53)
    at Array.map (<anonymous>)
    at _filter (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:500:17)
    at Logger.addFilter.args (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:96:37)
    at bunyan.filters.forEach (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:456:61)
    at Array.forEach (<anonymous>)
    at Logger.applyFilters (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:456:33)
    at Logger.fatal (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:450:32)
    at EventEmitter.Logger.uncaughtExceptionHandler (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:72:18)
    at EventEmitter.emit (events.js:194:15)
    at process.Logger.lifecycle.process.on.err (C:\Program Files\Salesforce CLI\client\node_modules\@salesforce\core\lib\logger.js:481:51)
    at process.emit (events.js:189:13)
    at process._fatalException (internal/bootstrap/node.js:496:27)
16:26:16.97 sfdx force:org:open ended with exit code 7

Hi All, 

I am using an experince cloud site with LWR template. In the site I wish to provide chat option to my customers leveraging Einstien chatbot. I have already created the bot and configured the Embedded services deployment settings. 

Now, I want to use the Embedded service chat component available OOTB on the experince cloud builder. But in LWR template I cannot see the "Embedded service chat" component. 

I skimmed through the documentation of LWR and Embedded Service but couldn't find a limitation. 

Can someone please help if I am missing on something or if there is a workaround to this?

Below is the screenshot from my LWR site builder.

User-added image

I received an error when testing a lightning web component. 

Invalid key value "[object Object]" in [Object: vm undefined (93)]. Key must be a string or number.

I am not sure what this error means or what it is referrencing. Does anyone know what this means?

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...!!