Skip to main content

Posts

Create Overlays with the New Modal Component

Recent posts

How to create Dynamic Generic Tree grid using LWC

Hello frnds todat i am talking about , how to create tree-grid using lwc Step-1:- First create Custom metadata, Click setup and In Quich Search box type " Custom metadata " Step-2:- Click on Custom metadata and click on "New custom metadata type" type custom metadata name and save after that create custom feilds, list given below image after that click on "manage" enter field api name according to your requirement Example given below Step-3:- Create Apex class Name is "SLMT_GenericHierarchiesController" global class SLMT_GenericHierarchiesController { @AuraEnabled(cacheable=true) global static List getFullHierarchies(Id recordId,String parentRelationship){ Id topLevelParentId = SLMT_GenericHierarchiesController.getUltimateParent(recordId,parentRelationship); List treeColumns = SLMT_GenericHierarchiesController.describeHierarchyMappings(recordId); List additionalFields =new List ();

How to Solve Mixed DML Error in APEX Test class #Salesforce

Hello frinds, Today i am talking about , how to solve mixd DML error in Apex, This error mostly come when , yiu are writing Apex Test . When are you insert Setup and non-setup object records in single transaction. Step-1- Writing Apex test class @isTest public class MIXEDDML { @isTest public static void TestData(){ UserRole obj=new UserRole(Name= 'ABC'); insert obj; Profile pf= [Select Id from profile where Name='System Administrator']; String orgId=UserInfo.getOrganizationId(); String dateString=String.valueof(Datetime.now()).replace(' ','').replace(':','').replace('-','') ; User uu=new User(firstname = 'ABC', lastName = 'XYZ', email = 'ak288@test.org', Username = 'ak288@test.org', EmailEncodingK

How to insert multiple object at a time or insert multiple Question with 4 option at a time in Lightning Component

Hello friend today post , How to insert multiple object or insert multiple question a time in lightning component, this post ,i take the example of insert multiple question at a time ,, so friends let us start ... Note: before condind first Create Two Custom Object 1-Quiz__c-create one custom field, Number-of-Rows__c(number type or text type both are suitable) 2-Question__c- create 6 custom fields.... SN__c(text type),Question__c(long Text type),Ans1__c(text type),Ans2__c(text type),Ans3__c(text type),Ans4__c(text type), Step=>1. first open your developer console                         go to File=>New=>Lightning Component                           Question.cmp <aura:component controller="QuizPostController" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >     <aura:handler name="init" value="{!this}&

Serialize data in JSON and Deserialize in Apex

Hello Friends today post, How to serialize data in JSON or JavaScript Component and Deserialize in Apex Class... so friends let us start........ First you create a lightning component and making some field , this post only controller part and apex code so you understand better if you create saome field and fetch data in jscontroller.. JsController code...                 Save:function(component,event,helper){                        //This is function               var AcName=document.getElementById('accountdata').value; //get data        // alert(AcName);         var Status=document.getElementById('txtStatus').value;//get data         var Priority=document.getElementById('Priority').value;//get data         var Origin=document.getElementById('txtOrigin').value;//get data         var Type=document.getElementById('txtType').value;//get data         var Reason=document.getElementById('Reason').value;//get data         var

How to used slds-hide/show class for div hide and show in lightning component

Hello friends today post ,how to create a lightning component to use slds-hide/show class, very easy to use class and aplly.. so let us start ... firstly create a lightning component and there are two or three div or anything when you want to hide/show ... so see given bellow example and udes slds-hide/show class Step=>1.                   goto developer console=>File=>New=>Lightning Component                           sldshideshow.cmp <aura:component >     <aura:attribute name="First" type="string" default="slds-show"/>     <aura:attribute name="Second" type="string" default="slds-hide"/>         <center>     <div class="slds-box" style="width:300px;height:300px;margin-top:15px;">         <div class="{!v.First}">             <div class="slds-form-element">                 <label class="slds-form-element_

How to Create Quick Email Sending in Lightning Component

Hello friends today post, how to send Email using lightning component so let start .... Step=>1. first open your developer console and goto...                                                                          File=>New=>Lightning Component                                    EmailSend.cmp <aura:component controller="EmailSendController" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >         <aura:attribute name="email" type="string"/>     <aura:attribute name="subject" type="string"/>     <aura:attribute name="body" type="string"/>     <aura:attribute name="mailStatus" type="boolean" default="false"/>         <div class="slds-box" style="width:700px;margin-top:10px;margin-left:10px;">     <div class="sld