• sai teja 69
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies
I have a requirement to override 'New' button for record type selection CASE object, on recordtype selection for one of the record type(1 out of 4) i need to open custom lwc component. for 3 remaining record types i need to open sandard lightning popups.

I created lwc component for opening record type selection. from that popup i am opening new standard record creation popup. There while clicking on the cancel it is just closing the popup and staying on the record type selection lwc. But i need to redirect to case list view.

Custom LWC for record type selectoin Case object
case record type selection

standard case record creation popup
I am opening this standard record creation popup by using below code with returl but while clicking on the cancel button, it is not going back to case list view.
this[NavigationMixin.Navigate]({
        "type": "standard__webPage",
       "attributes": {
          "url": str.concat(this.recordTypeId, '&retURL=%2F500%2Fo')
     }
  });

Is there any way to override the cancel button action.
I need to open LWC component when i click on "Edit" button on another LWC component. I have one LWC component with some buttons on case detail page. When i click on the edit button an another edit lwc component should be open with the same record id context.

I have wrote this below function on 'Edit' button onclick LWC.   In url it is coming as "lightning/cmp/c%3AEditCaseButtonOverride" and error This page isn't available in Salesforce Lightning Experience or mobile app.
navigateToEditComponent() {
        this[NavigationMixin.Navigate]({
            "type": "standard__component",
            "attributes": {
                componentName: "c:EditCaseButtonOverride",
                recordId :this.recordId   
            }   
        });
    }



case edit page
how render will work in LWC? it will render specific component or entire template?

Can i use render in lwc as follows
 
<lightning-button class="slds-button" variant="neutral" render={checkFlag}>Escalate to AMS</lightning-button>

 
@api recordId not giving record id of the current record lightning page edit action LWC
I have placed LWC component in auracomponent. I have overrided the edit button action with this aura component.
 
<aura:component implements="flexipage:availableForAllPageTypes,lightning:actionOverride,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
	<c:lMCaseNew  recordId="{!v.recordId}"/> // invoking lwc component
</aura:component>
lwc.js
import { LightningElement, track, wire, api } from 'lwc';
import getCaseDetails from '@salesforce/apex/caseController.getCaseDetails';


export default class LMCaseNew extends NavigationMixin(LightningElement) {
@api recordId;

@wire(getCaseDetails, { caseId: '$recordId' })caseRecordDetails({data}){
        if(data){
            alert("data"+data);
        
        }else{
            alert(1);
        }
    }
apex.cls
@AuraEnabled
    public static List<Case> getCaseDetails(String caseId){
        system.debug('record Id'+caseId);
        List<Case> cs = [select Id,Issue_Name__c from Case where Id =: caseId];
        return cs;
    }


It is giving alert(1);
 
I have custom record types in my case object. I need to open specific lwc component(in this we have custom case creation page) when i select a specifc record type. how can we achieve in lwc lightning?

case record type selection
I have designed one form using lightning record edit form and i need to perform some client side validations before submitting the from and show some errors. Is there any inbuilt functionality in LWC
Helloo..I am getting below error repeatedly. I tried all the options. Please help.

Challenge Not yet complete... here's what's wrong: 
The Lightning component named TrailheaDX must open a link to https://developer.salesforce.com/trailheadx/, must open in a new window (using the target attribute of ui:outputurl), and must be included in the Sales app.

Component code:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <ui:outputurl aura:id="TrailheaDX" value="https://developer.salesforce.com/trailheadx/" label="TrailheaDX" target="_blank" />
</aura:component>


User-added image
 
Helloo..I am getting below error repeatedly. I tried all the options. Please help.

Challenge Not yet complete... here's what's wrong: 
The Lightning component named TrailheaDX must open a link to https://developer.salesforce.com/trailheadx/, must open in a new window (using the target attribute of ui:outputurl), and must be included in the Sales app.

Component code:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <ui:outputurl aura:id="TrailheaDX" value="https://developer.salesforce.com/trailheadx/" label="TrailheaDX" target="_blank" />
</aura:component>


User-added image
 
I'm struggling with the custom lightning component on this part. I don't have much background coding and am having trouble finding resources to help me achieve coding the lightning component. If someone could help give me some framework code to create a custom lightning component to hold a URL or direct me to a resource that help break this down I'd be very appreciative.