- Roy Sourav
- NEWBIE
- 20 Points
- Member since 2019
- Salesforce Developer
-
ChatterFeed
-
0Best Answers
-
7Likes Received
-
0Likes Given
-
8Questions
-
3Replies
LMS - "invalid message context" error.
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..!!
-
- Roy Sourav
- April 04, 2022
- Like
- 3
- Continue reading or reply
Embedded Service Chat component not visible on Experience builder for Build your own(LWR) template.
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.
-
- Roy Sourav
- February 11, 2022
- Like
- 3
- Continue reading or reply
LWC - real time use cases of slots
Thanks in advance.
-
- Roy Sourav
- June 05, 2020
- Like
- 0
- Continue reading or reply
LWC - pubsub or custom event
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.
-
- Roy Sourav
- June 05, 2020
- Like
- 0
- Continue reading or reply
guest user sends emails with visualforce email template - invalid cross reference ID -
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...!!
-
- Roy Sourav
- February 11, 2020
- Like
- 0
- Continue reading or reply
VS Code error while opening default scratch org
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
-
- Roy Sourav
- September 13, 2019
- Like
- 1
- Continue reading or reply
Unable to style the <select> tag in vf page (html tag) which renders as ms-excel
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 -
when rendered as page-
Please help..!! Thanks for the Support..!!
-
- Roy Sourav
- May 31, 2019
- Like
- 0
- Continue reading or reply
Unexpected error loading components: Error: Error retrieving items list. Please retry. (1)
Unexpected error loading components:
Error: Error retrieving items list. Please retry. (1)
Please help..!!
-
- Roy Sourav
- May 14, 2019
- Like
- 0
- Continue reading or reply
LMS - "invalid message context" error.
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..!!
-
- Roy Sourav
- April 04, 2022
- Like
- 3
- Continue reading or reply
Embedded Service Chat component not visible on Experience builder for Build your own(LWR) template.
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.
-
- Roy Sourav
- February 11, 2022
- Like
- 3
- Continue reading or reply
VS Code error while opening default scratch org
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
-
- Roy Sourav
- September 13, 2019
- Like
- 1
- Continue reading or reply
Embedded Service Chat component not visible on Experience builder for Build your own(LWR) template.
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.
- Roy Sourav
- February 11, 2022
- Like
- 3
- Continue reading or reply
LWC Error Message
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?
- Jennifer Prather
- June 05, 2020
- Like
- 0
- Continue reading or reply
guest user sends emails with visualforce email template - invalid cross reference ID -
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...!!
- Roy Sourav
- February 11, 2020
- Like
- 0
- Continue reading or reply