• Vijayasaharan
  • NEWBIE
  • 30 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 9
    Replies
Hi I am building a Node JS app with lightning out. 
I am able to load the lightning component, however the fonts aren't properly loading. When I go to Network in Developer Console 
User-added image
Hi I am trying to use the XLSX JS libraries to parse a CSV convert to JSON and upload into salesforce object. I had done this in Visual force and wanted to do the same in LWC.
But I am stuck in calling the 3rdd party JS lib method.  My question is how do you call a method in the 3rd lib.
 
import 	shimlatest from '@salesforce/resourceUrl/shimlatest';
import 	dropsh from '@salesforce/resourceUrl/DropSheet';
import 	xlsxfull from '@salesforce/resourceUrl/xlsxfull';

Promise.all([
            loadScript(this, shimlatest),
            loadScript(this, xlsxfull),
        ])
            .then(()  => {
                X = XLSX; / THIS ONE ALWAYS COMES AS undefind 
                console.log('XLSX Value of ' + X);
                if(X !== undefined)
                   X = '';
                   this.initializePage(); 
                })
            .catch(error => {
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error loading XLSX modules',
                        message: error.message,
                        variant: 'error',
                    }),
                );
            });

 
HI I am building a Lightning Web Component (LWC)
I did all the edits and I have an array with ID and Perecentage(custom field). The array is marked with @track in the js file.
I am lost on how I can convert this array in APEX to a LIST so that I can update the data in APEX.

Thanks
Hi 
I would like to create a report on Cases and show a bunch of case fields and the next possible escalation time , time remaining for escalation. 

I can see them under "Monitior Escalations" but I would like the case team to see it in their report too. Please let me how we can do this.

Thanks
Vijayasaharan.R
Hi
I create a new site which I would like to have my end users to access without SF login. I created a custom object and I was able to display the records but the insert isn't working. I get the message below 

"Authorization Required  You must first log in or register before accessing this page. 
If you have forgotten your password, click Forgot Password to reset it"
 
<apex:page standardController="OnboardingInfo__c" tabStyle="OnboardingInfo__c">
    <apex:form>
    
     <apex:pageBlock>
         
        <apex:pageBlockSection columns="1">

        <apex:inputField  value="{!OnboardingInfo__c.Name__c}"/> 
        <apex:inputField  value="{!OnboardingInfo__c.Technical_Contact__c}"/>
        <apex:inputField  value="{!OnboardingInfo__c.Field1__c}"/>
        <apex:inputField  value="{!OnboardingInfo__c.Module1__c}"/>
        </apex:pageBlockSection>
         <apex:pageBlockButtons >
        
                <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
        
            </apex:pageBlock>
        </apex:form>
    <apex:pageBlock>
        THIS IS A TEST
        
        <apex:listViews type="OnboardingInfo__c"/> 
     </apex:pageBlock>
</apex:page>

I have granted Create Read Edit permission under the "Remote Site Settings => Profile" for the Site that I created. Please help me in letting me know the permission that I am missing.

Ideally I would like to show the Add / Edit Screen that you get in out of box Salesforce object inside the Site (I am assuming we need to use VF page for this).

Is there a way we can add the entire tab to the Visual force page inside the "Site" created?
Hi All
I have searched for multiple post to find an answer for this common error but I am not sure what mistake I am commiting.. All I need to do query a local list and add ID's to a SET so that I dont execute multiple SOQL's. Appreciate your help on this

My CODE
I am using "Execute Highlight" option to see if my code works and it breaks in line 7
Line: 7, Column: 18
Initial term of field expression must be a concrete SObject: List<Allocation__c>
 
List <Allocation__C> lst =  new List <Allocation__c>();
lst = [Select  Percentage__c, Line_of_Business__c, Support_Contract__c
                          from Allocation__C WHERE Percentage__c = 50 LIMIT 1 ];
Set<ID> supConID = new Set<ID>(); --IS THIS THE CORRECT DATA STRUCTURE
for(Allocation__C al :lst) -- THIS IS WHERE THE ERROR HAPPENS, 
{
    supConID.Add(lst.Support_Contract__c);
}
List <Request__C> req = new List <Request__c>();
req = [Select ID, LOB_Allocations__c 
                         FROM Request__c WHERE ID IN (Select  Support_Contract__c
                          from Allocation__C WHERE Percentage__c = 50)];


List <Allocation__C> alloc = new <Allocation__c>();
List <Request__C> reqUpdate = new <Request__C>();
for(Request__C r: req)
{
    string lobstring = '';
    Request__c rtemp = new Request__c();
    for(Allocation__c a: [select Line_of_Business__c, Percentage__c FROM lst WHERE Support_Contract__c = :r.ID])
    {
        lobstring += (lobstring ==''?'':' / ')+a.Line_of_Business__c+'('+  a.Percentage__c + '%)';
    }
    rtemp.ID = r.ID;
    rtemp.LOB_Allocations__c = lobstring;
    reqUpdate.Add(rtemp);
    
}
update reqUpdate;
/*List<Request__C, string> fnl = new List<Request__c , string>;
for ( Allocation__C ac :lst)
{
    ac.Allocation_Notes__c = ac.Allocation_Notes__c;
    update ac;
}*/
Hi I am building a Node JS app with lightning out. 
I am able to load the lightning component, however the fonts aren't properly loading. When I go to Network in Developer Console 
User-added image
Hello!
I'm trying to import a third-party js library in order to display a datatable.
https://datatables.net/examples/data_sources/js_array.html

I managed to import jQuery and DataTable js using import and static resources but when I try to translate the documentation sentence :
$('#example').DataTable()

into what a LWC accepts it doesn't work:
this.template.querySelector('table.example').DataTable();
Please find hereby my code:
filteredTable.html
<template>
    <lightning-card title="OST Events">
        <lightning-layout>
            <lightning-layout-item>
                    <table id="table_id" class="example">
                        <thead>
                            <tr>
                                <th>Column 1</th>
                                <th>Column 2</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Row 1 Data 1</td>
                                <td>Row 1 Data 2</td>
                            </tr>
                            <tr>
                                <td>Row 2 Data 1</td>
                                <td>Row 2 Data 2</td>
                            </tr>
                        </tbody>
                    </table>
                <template if:true={error}>
                    <c-error-panel errors={error}></c-error-panel>
                </template>
            </lightning-layout-item>
        </lightning-layout>
    </lightning-card>
</template>

filteredTable.js
import { LightningElement, track } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import DATATABLE from '@salesforce/resourceUrl/dataTablesv10_18';
import JQUERY from '@salesforce/resourceUrl/jQuery';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

export default class FilteredTable extends LightningElement {
    DataTable;
    @track error;
    @track dataExample;

    dataTablejsInitialized = false;

    renderedCallback() {
        if (this.dataTablejsInitialized) {
            return;
        }
        this.dataTablejsInitialized = true;
        loadScript(this,JQUERY)
        .then(()=>{
            loadScript(this, DATATABLE+'/datatables.min.js')
        })
        .then(()=>{
            console.log("ENTRO EN EL .THEN DEL LOADSCRIPT");
            this.DataTable = this.template.querySelector('table.example').DataTable();
            })
            .catch(error => {
                this.error = error;
                this.dispatchEvent(
                    new ShowToastEvent({
                        title: 'Error loading DataTables',
                        message: error.message,
                        variant: 'error'
                    })
                );
            });
    }

}

Is there an other way to call a function of an imported js library?

Thanks!
 
HI I am building a Lightning Web Component (LWC)
I did all the edits and I have an array with ID and Perecentage(custom field). The array is marked with @track in the js file.
I am lost on how I can convert this array in APEX to a LIST so that I can update the data in APEX.

Thanks
Hi
I create a new site which I would like to have my end users to access without SF login. I created a custom object and I was able to display the records but the insert isn't working. I get the message below 

"Authorization Required  You must first log in or register before accessing this page. 
If you have forgotten your password, click Forgot Password to reset it"
 
<apex:page standardController="OnboardingInfo__c" tabStyle="OnboardingInfo__c">
    <apex:form>
    
     <apex:pageBlock>
         
        <apex:pageBlockSection columns="1">

        <apex:inputField  value="{!OnboardingInfo__c.Name__c}"/> 
        <apex:inputField  value="{!OnboardingInfo__c.Technical_Contact__c}"/>
        <apex:inputField  value="{!OnboardingInfo__c.Field1__c}"/>
        <apex:inputField  value="{!OnboardingInfo__c.Module1__c}"/>
        </apex:pageBlockSection>
         <apex:pageBlockButtons >
        
                <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
        
            </apex:pageBlock>
        </apex:form>
    <apex:pageBlock>
        THIS IS A TEST
        
        <apex:listViews type="OnboardingInfo__c"/> 
     </apex:pageBlock>
</apex:page>

I have granted Create Read Edit permission under the "Remote Site Settings => Profile" for the Site that I created. Please help me in letting me know the permission that I am missing.

Ideally I would like to show the Add / Edit Screen that you get in out of box Salesforce object inside the Site (I am assuming we need to use VF page for this).

Is there a way we can add the entire tab to the Visual force page inside the "Site" created?
Hi All
I have searched for multiple post to find an answer for this common error but I am not sure what mistake I am commiting.. All I need to do query a local list and add ID's to a SET so that I dont execute multiple SOQL's. Appreciate your help on this

My CODE
I am using "Execute Highlight" option to see if my code works and it breaks in line 7
Line: 7, Column: 18
Initial term of field expression must be a concrete SObject: List<Allocation__c>
 
List <Allocation__C> lst =  new List <Allocation__c>();
lst = [Select  Percentage__c, Line_of_Business__c, Support_Contract__c
                          from Allocation__C WHERE Percentage__c = 50 LIMIT 1 ];
Set<ID> supConID = new Set<ID>(); --IS THIS THE CORRECT DATA STRUCTURE
for(Allocation__C al :lst) -- THIS IS WHERE THE ERROR HAPPENS, 
{
    supConID.Add(lst.Support_Contract__c);
}
List <Request__C> req = new List <Request__c>();
req = [Select ID, LOB_Allocations__c 
                         FROM Request__c WHERE ID IN (Select  Support_Contract__c
                          from Allocation__C WHERE Percentage__c = 50)];


List <Allocation__C> alloc = new <Allocation__c>();
List <Request__C> reqUpdate = new <Request__C>();
for(Request__C r: req)
{
    string lobstring = '';
    Request__c rtemp = new Request__c();
    for(Allocation__c a: [select Line_of_Business__c, Percentage__c FROM lst WHERE Support_Contract__c = :r.ID])
    {
        lobstring += (lobstring ==''?'':' / ')+a.Line_of_Business__c+'('+  a.Percentage__c + '%)';
    }
    rtemp.ID = r.ID;
    rtemp.LOB_Allocations__c = lobstring;
    reqUpdate.Add(rtemp);
    
}
update reqUpdate;
/*List<Request__C, string> fnl = new List<Request__c , string>;
for ( Allocation__C ac :lst)
{
    ac.Allocation_Notes__c = ac.Allocation_Notes__c;
    update ac;
}*/