• Shyamala Varadharajan
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 10
    Replies
I have a use case like in first column I need to dispaly some valuein first column which is a text value , according to that i need to make next column as dynamic which is picklist field  and according to the second column the third column need to be dynamic which is picklist field. For Example,
Column A (Text)Column B (Picklist)Column c (Picklist)
AB
C
D (If user select D)
B
C
BA
C
D (If user select A)
C
D
CA
B
D(If user select B)
A
D
DA
B
C(If user select C)
A
B


Is this possible to do in lwc datatable. If yes can anyone help me how to acheive this. Thanks in advance.
I have a picklist field which I am fetching data from Apex. Now the scenario is I have to fetch all the data and I'm able to see those values in console.log but the picklist field looks greyed out and not able to edit even after adding wrapText=true. I created custom type for picklist. The values are not visible. Do you have any idea what I am doing wrong? Please help me on this.

User-added image

User-added image

Here is my code:
aRADataTable.html:
<template>
    <lightning-card>
        <c-custom-type-global
        data={dataRecords}
        columns={columns}
        key-field="Id"
        suppress-bottom-bar
        oncellchange={handleSave}
        draft-values={saveDraftValues}
        errors={errors}
        wrap-text-max-lines=3
        hide-checkbox-column
        horizontal-scroll-hidden
        onkeyup={changeInTable}>
    </c-custom-type-global>
        </lightning-card>
</template>

aRADataTable.js:

import { LightningElement, track,api } from 'lwc';
import fetchInventoryDataTableRecords from '@salesforce/apex/ARAInventoryTypeUpgrade.fetchInventoryDataTableRecords';

export default class ARADataTable extends LightningElement {
    @track columns;
    @track allInvTypes = [];
    @track dataRecords = [];
    @track pickListOptions = [];
    @api options;
   
    connectedCallback() {
       
        this.columns = [{ label: 'Inventory Type', fieldName: 'inventoryTypeCode', type: 'text', wrapText: true, hideDefaultActions: 'true' },
        { label: 'Priority 1', fieldName: 'p1', type: 'priorityPicklist', wrapText: true,
        typeAttributes:{
         //   options: this.pickListOptions,
           options: { fieldName: 'pickListOptions' },
            value :{fieldName : 'Priority'},
            placeholder: 'Choose Priority'
        }  
    }
];
    fetchInventoryDataTableRecords()
        .then(result => {
           
            let options=[];
            this.dataRecords = result;
            this.defaultDataTableValues = this.dataRecords;
            for (var i = 0; i < this.dataRecords.length; i++) {
                //Taking one data value of row at a time
                const item = this.dataRecords[i];
                this.allInvTypes.push(item.inventoryTypeCode);
                options.push(item.inventoryTypeCode);
            }
             this.pickListOptions.push(options);
            console.log('picklistOptions>>>>'+this.pickListOptions);
            return this.pickListOptions;
          })
        .catch(error => {
            console.error(error.message);
        });
      }
}

customPicklist.html

<template>
    <lightning-combobox
      name="picklist"
      label={typeAttributes.label}
      value={typeAttributes.value}
      placeholder={typeAttributes.placeholder}
      options={typeAttributes.options}
    ></lightning-combobox>
</template>

customTypeGlobal.js

import LightningDatatable from 'lightning/datatable';
import customPicklist from './customPicklist.html';
export default class CustomTypeGlobal extends LightningDatatable {
    static customTypes = {
        priorityPicklist:{
            template : customPicklist,
            standardCellLayout: true,
            typeAttributes:['label','value','placeholder','options']
        }
    }
}
Hi All,

In LWC screen I have a Export button where on click of that button I'm making an API callout(Synchronous Call). In response I'm getting size more than 25 MB. How to handle this as the size is very huge. Please help.
Hi All,

I'm making an synchronous call where I need to get more than 6MB. so I want to split the call and make 2 request.
For example, If I want to request 10,000 records to an external system then I need to request,
  • 1-6000 in first API request call and
  • 6001-10,000 in second API request call
please help me on this.
Thanks you.
Hi,

I know that email limits for  trigger, apex class or API is set for 5000 per day. What is the Email limits for Flows per day.Can anyone help me this.
Hi ,
Can anyone please say how to get  voucher codes for Salesforce Architect(Sharing and visibility Designer) Certifications. 
Hi All,
Can anyone please say how to get  voucher codes for Salesforce Architect(Sharing and visibility Designer) Certifications. 
When deploying a Custom app with profileOverrides present, the profile names contain symbols like '-' the deployment is getting failed with 'invalid cross-reference id' as the error.
       This is the place I face error.
       
       <profileActionOverrides>
        <actionName>Tab</actionName>
        <content>Title_Dashboard</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>standard-home</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>XXX - Librarian Profile</profile>
        </profileActionOverrides>
        
        How to sort it out. Please Help.
Hello,
 
I have a Custom Object with 4 fields and 1 Date Field. If I try to create a new record with same values I need to check the old records and if the record persists then need to update the old Record with new Date . This is the code I have tried but the issue is it's updating old record as well as creating new record with same values which cause duplicates.I have written this in before Insert. please help.
 
public class duplicateHandler {
 
   public static void triggertocheckDuplicateBeforeInsert(list(List<CustObject> custList){
 Set <String> agencySet = new Set<String>();
Set <String> agencyTypeSet = new Set<String>();
Set <String> advetiserSet = new Set<String>();
Set <String> platformSet = new Set<String>();
Set <Date> startDateSet = new Set<Date>();
 
List<CustObject> oldList = new List<CustObject>();
 
        for (CustObject custMap : custList){
             agencySet.add(custMap.Agency__c);
             agencyTypeSet.add(custMap.Agency_Type__c);
             advetiserSet.add(custMap.Advertiser__c);
             platformSet.add(custMap.Platform__c);
        }
 
        List<CustObject> oldcustList = [SELECT Agency__c,Agency_Type__c,Advertiser__c,Platform__c,Start_Date__c FROM CustObject WHERE Agency__c IN :agencySet AND Agency_Type__c IN :agencyTypeSet AND Advertiser__c IN :advetiserSet AND Platform__c IN :platformSet];
for (CustObject custMap : custList){
  for( CustObject oldCust : oldcustList){
    if(oldcustList.size() > 0){
       if (custMap.Start_Date__c != oldCust.Start_Date__c) {
          oldcustList.Start_Date__c = custMap.Start_Date__c;
oldList.add(oldCust);
}
}
}
update oldList;
}
}
Hello,

I have a Custom Object with 4 fields  and 1 Date Field. If I try to create a new record with same values  I need to check the old records and if the record persists then need to update the old Record with new Date . How can we achieve this. Please help
Hello,

I have a Custom Object with 3 text fields  and 1 Date Field. If I try to create a new record with same values for all 4 fields then need to throw Duplicate Error else if I have same values in Text Field and  Date is different then need to update the existing record with new Date value. How can I achieve this . Please help
Hi,

I know that email limits for  trigger, apex class or API is set for 5000 per day. What is the Email limits for Flows per day.Can anyone help me this.
I have a use case like in first column I need to dispaly some valuein first column which is a text value , according to that i need to make next column as dynamic which is picklist field  and according to the second column the third column need to be dynamic which is picklist field. For Example,
Column A (Text)Column B (Picklist)Column c (Picklist)
AB
C
D (If user select D)
B
C
BA
C
D (If user select A)
C
D
CA
B
D(If user select B)
A
D
DA
B
C(If user select C)
A
B


Is this possible to do in lwc datatable. If yes can anyone help me how to acheive this. Thanks in advance.
I have a picklist field which I am fetching data from Apex. Now the scenario is I have to fetch all the data and I'm able to see those values in console.log but the picklist field looks greyed out and not able to edit even after adding wrapText=true. I created custom type for picklist. The values are not visible. Do you have any idea what I am doing wrong? Please help me on this.

User-added image

User-added image

Here is my code:
aRADataTable.html:
<template>
    <lightning-card>
        <c-custom-type-global
        data={dataRecords}
        columns={columns}
        key-field="Id"
        suppress-bottom-bar
        oncellchange={handleSave}
        draft-values={saveDraftValues}
        errors={errors}
        wrap-text-max-lines=3
        hide-checkbox-column
        horizontal-scroll-hidden
        onkeyup={changeInTable}>
    </c-custom-type-global>
        </lightning-card>
</template>

aRADataTable.js:

import { LightningElement, track,api } from 'lwc';
import fetchInventoryDataTableRecords from '@salesforce/apex/ARAInventoryTypeUpgrade.fetchInventoryDataTableRecords';

export default class ARADataTable extends LightningElement {
    @track columns;
    @track allInvTypes = [];
    @track dataRecords = [];
    @track pickListOptions = [];
    @api options;
   
    connectedCallback() {
       
        this.columns = [{ label: 'Inventory Type', fieldName: 'inventoryTypeCode', type: 'text', wrapText: true, hideDefaultActions: 'true' },
        { label: 'Priority 1', fieldName: 'p1', type: 'priorityPicklist', wrapText: true,
        typeAttributes:{
         //   options: this.pickListOptions,
           options: { fieldName: 'pickListOptions' },
            value :{fieldName : 'Priority'},
            placeholder: 'Choose Priority'
        }  
    }
];
    fetchInventoryDataTableRecords()
        .then(result => {
           
            let options=[];
            this.dataRecords = result;
            this.defaultDataTableValues = this.dataRecords;
            for (var i = 0; i < this.dataRecords.length; i++) {
                //Taking one data value of row at a time
                const item = this.dataRecords[i];
                this.allInvTypes.push(item.inventoryTypeCode);
                options.push(item.inventoryTypeCode);
            }
             this.pickListOptions.push(options);
            console.log('picklistOptions>>>>'+this.pickListOptions);
            return this.pickListOptions;
          })
        .catch(error => {
            console.error(error.message);
        });
      }
}

customPicklist.html

<template>
    <lightning-combobox
      name="picklist"
      label={typeAttributes.label}
      value={typeAttributes.value}
      placeholder={typeAttributes.placeholder}
      options={typeAttributes.options}
    ></lightning-combobox>
</template>

customTypeGlobal.js

import LightningDatatable from 'lightning/datatable';
import customPicklist from './customPicklist.html';
export default class CustomTypeGlobal extends LightningDatatable {
    static customTypes = {
        priorityPicklist:{
            template : customPicklist,
            standardCellLayout: true,
            typeAttributes:['label','value','placeholder','options']
        }
    }
}
Hi All,

In LWC screen I have a Export button where on click of that button I'm making an API callout(Synchronous Call). In response I'm getting size more than 25 MB. How to handle this as the size is very huge. Please help.
Hi All,
Can anyone please say how to get  voucher codes for Salesforce Architect(Sharing and visibility Designer) Certifications. 
When deploying a Custom app with profileOverrides present, the profile names contain symbols like '-' the deployment is getting failed with 'invalid cross-reference id' as the error.
       This is the place I face error.
       
       <profileActionOverrides>
        <actionName>Tab</actionName>
        <content>Title_Dashboard</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>standard-home</pageOrSobjectType>
        <type>Flexipage</type>
        <profile>XXX - Librarian Profile</profile>
        </profileActionOverrides>
        
        How to sort it out. Please Help.
Hello,
 
I have a Custom Object with 4 fields and 1 Date Field. If I try to create a new record with same values I need to check the old records and if the record persists then need to update the old Record with new Date . This is the code I have tried but the issue is it's updating old record as well as creating new record with same values which cause duplicates.I have written this in before Insert. please help.
 
public class duplicateHandler {
 
   public static void triggertocheckDuplicateBeforeInsert(list(List<CustObject> custList){
 Set <String> agencySet = new Set<String>();
Set <String> agencyTypeSet = new Set<String>();
Set <String> advetiserSet = new Set<String>();
Set <String> platformSet = new Set<String>();
Set <Date> startDateSet = new Set<Date>();
 
List<CustObject> oldList = new List<CustObject>();
 
        for (CustObject custMap : custList){
             agencySet.add(custMap.Agency__c);
             agencyTypeSet.add(custMap.Agency_Type__c);
             advetiserSet.add(custMap.Advertiser__c);
             platformSet.add(custMap.Platform__c);
        }
 
        List<CustObject> oldcustList = [SELECT Agency__c,Agency_Type__c,Advertiser__c,Platform__c,Start_Date__c FROM CustObject WHERE Agency__c IN :agencySet AND Agency_Type__c IN :agencyTypeSet AND Advertiser__c IN :advetiserSet AND Platform__c IN :platformSet];
for (CustObject custMap : custList){
  for( CustObject oldCust : oldcustList){
    if(oldcustList.size() > 0){
       if (custMap.Start_Date__c != oldCust.Start_Date__c) {
          oldcustList.Start_Date__c = custMap.Start_Date__c;
oldList.add(oldCust);
}
}
}
update oldList;
}
}
Hello,

I have a Custom Object with 4 fields  and 1 Date Field. If I try to create a new record with same values  I need to check the old records and if the record persists then need to update the old Record with new Date . How can we achieve this. Please help
Hello,

I have a Custom Object with 3 text fields  and 1 Date Field. If I try to create a new record with same values for all 4 fields then need to throw Duplicate Error else if I have same values in Text Field and  Date is different then need to update the existing record with new Date value. How can I achieve this . Please help