• Sagar Dumbre
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
I have a lightning web component which is creating a record for "ResidentialLoanApplication" which is a standard object in Mortgage FSC. I have embedded this component in Screen flow and it is placed on the public community page.

Guest user profile is given permission to run the flow and flow is running under system context without sharing. I don't see "ResidentialLoanApplication" under the guest user profile to give them access.

When I access the page containing the flow, it gives me an error saying "You don't have access to this record. Ask your administrator for help or to request access." 

Any Idea what is missing here?
 
Is there any way to get below value through Apex/SOQL?

User-added image
I am trying to dispatch an error event in the lighting record edit form through javascript. Below is my code sample. I would like to highlight the error field with the error message. I am able to get a response in the handleError method however my fields are not getting highlighted with the error message.
Any idea what I am missing? Thanks.
<lightning-record-edit-form object-api-name="Loan_Application__c" onerror={handleError} record-id={recordId} >
	<lightning-messages> </lightning-messages>                
	<lightning-input-field field-name="Legal_Entity__c"></lightning-input-field>
</lightning-record-edit-form>

JS:

onButtonClick(event){
	event.preventDefault();        
    const forms = this.template.querySelector('lightning-record-edit-form');
    if (forms) {      
      forms.dispatchEvent(
        new CustomEvent('error', {
          detail: {
            output: {
              errors: [],
              fieldErrors: {                
                Legal_Entity__c: [
                  {
                    constituentField: null,
                    duplicateRecordError: null,
                    errorCode: 'FIELD_CUSTOM_VALIDATION_EXCEPTION',
                    field: 'Legal_Entity__c',
                    fieldLabel: 'Legal Entity',
                    message: 'Please provide your legal entity type.',
                  },
                ],
              },
            },
          },
        })
      );
    }
}

handleError(event) {    
	console.log('OUTPUT => ', JSON.stringify(event.detail));
}

 
Hi,
I am trying to apply an XSLT transformation to an XML file and display the output in div element. Below code works in the local development server. However, if I add this component in any page layout in salesforce, it failed with below error.

TypeError: XSLTProcessor constructor: 'new' is required
import { LightningElement } from 'lwc';
import testXml from '@salesforce/resourceUrl/testXml';
import testXslt from '@salesforce/resourceUrl/testXslt';

export default class MyComponent extends LightningElement {

    renderedCallback() {
        const xsltProcessor = new XSLTProcessor();
        xsltProcessor.importStylesheet(testXslt);
        const result = xsltProcessor.transformToFragment(testXml, document);

        this.template.querySelector('.container').appendChild(result);
    }
}
Any suggestion to make it work in salesforce page/record layout.
 
I am trying to dispatch an error event in the lighting record edit form through javascript. Below is my code sample. I would like to highlight the error field with the error message. I am able to get a response in the handleError method however my fields are not getting highlighted with the error message.
Any idea what I am missing? Thanks.
<lightning-record-edit-form object-api-name="Loan_Application__c" onerror={handleError} record-id={recordId} >
	<lightning-messages> </lightning-messages>                
	<lightning-input-field field-name="Legal_Entity__c"></lightning-input-field>
</lightning-record-edit-form>

JS:

onButtonClick(event){
	event.preventDefault();        
    const forms = this.template.querySelector('lightning-record-edit-form');
    if (forms) {      
      forms.dispatchEvent(
        new CustomEvent('error', {
          detail: {
            output: {
              errors: [],
              fieldErrors: {                
                Legal_Entity__c: [
                  {
                    constituentField: null,
                    duplicateRecordError: null,
                    errorCode: 'FIELD_CUSTOM_VALIDATION_EXCEPTION',
                    field: 'Legal_Entity__c',
                    fieldLabel: 'Legal Entity',
                    message: 'Please provide your legal entity type.',
                  },
                ],
              },
            },
          },
        })
      );
    }
}

handleError(event) {    
	console.log('OUTPUT => ', JSON.stringify(event.detail));
}

 
Hi,
I am trying to apply an XSLT transformation to an XML file and display the output in div element. Below code works in the local development server. However, if I add this component in any page layout in salesforce, it failed with below error.

TypeError: XSLTProcessor constructor: 'new' is required
import { LightningElement } from 'lwc';
import testXml from '@salesforce/resourceUrl/testXml';
import testXslt from '@salesforce/resourceUrl/testXslt';

export default class MyComponent extends LightningElement {

    renderedCallback() {
        const xsltProcessor = new XSLTProcessor();
        xsltProcessor.importStylesheet(testXslt);
        const result = xsltProcessor.transformToFragment(testXml, document);

        this.template.querySelector('.container').appendChild(result);
    }
}
Any suggestion to make it work in salesforce page/record layout.