• Praveen Kumar R 6
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 6
I want to override the standard multiAdd (Add Products) button of the OrderItem object. As salesforce wasn't provided a way to override it with a Lightning component, I was invoked my component in an VF with a standard controller as 'Order'. If we have provided the standard controller as 'OrderItem', I'll not be able to capture the Order recordId. Please suggest a way to override it.

One more query is, why the salesforce hasn't provided the option to create the quick actions on OrderItem object?
I tried using the 'For update' keyword in apex controller SOQL query for locking the set of records of a custom object. But it's not working fine for me. Please share some example code for the keyword use case.

As far as I know Salesforce UI trims the multiple white spaces between the words of a text field. But I can still see them in the edit page of the record. How to avoid continuous multiple white spaces while saving a record itself? 

Also, the UI trims the field value, Is that the same value saved in database?

HI, Could you please guide me how to make the wrapper class object reactive in LWC js. 

I believe that @track properties are reactive but when I change the value of any property in `this.coreAttributes` js object, its not reflective in on `Save` button click 

Js file

import { LightningElement, track, api } from "lwc";
import queryCoreAttributes from "@salesforce/apex/P1PlantInfoPromptSolar.queryCoreAttributes";

export default class P1PlantInfoPromptSolar extends LightningElement {
@track coreAttributes;

connectedCallback() {
    .then(result => {
      this.coreAttributes = JSON.parse(result);


    this.promptSpecificAttributes = {
    console.log(' prompt specific att -> '+ JSON.stringify(this.coreAttributes));
html file
<template for:each={coreAttributes} for:item="coreAttribute">
              <tr key={coreAttribute.key}>
                  <template if:false={coreAttribute.isPicklist}>
                    <input type={coreAttribute.attributeDataType} name={coreAttribute.attributeHeader}
                  <template if:true={coreAttribute.isPicklist}>
                    <select size="1" name={coreAttribute.attributeHeader}>
                      <option value="None">--None--</option>
                      <template for:each={coreAttribute.picklistValues} for:item="attributePickValues">
                        <option key={coreAttribute.key} value={coreAttribute.attributeValue}>{attributePickValues}</option>

Hello All,
I am currently looking into Lightning Web Components and have hit a wall. I have a wire decorator that calls to an apex function returning a wrapper class. This Wrapper actually contains a Wrapper that contains a Wrapper, so it is nested 3 times. What I would like to do is updated a field on the 3rd Wrapper when a checkbox is checked or unchecked.

important HTML:
<template if:true={progWrap.progList}>
                    <template for:each = {progWrap.progList} for:item = "prog">
                        <tr key = {prog.progAuth.Id} >
                            <template if:true={prog.checkboxes}>
                                <template for:each={prog.checkboxes} for:item="checkbox">
                                    <template if:true={checkbox.visible}>
                                        <td key={checkbox.section}><lightning-input type="checkbox" value={checkbox.section} checked={checkbox.checked} data-prog-name ={prog.programName} onchange={handleCheckboxChange}></lightning-input></td>
                                    <template if:false={checkbox.visible}>
                                        <td key={checkbox.section}>-</td>

import { LightningElement, api, track, wire } from 'lwc';
import initWrapper from '@salesforce/apex/programAuthComponentController.initWrapper';

export default class programAuthWebComponent extends LightningElement {
    @api recordId;
    @track progWrap;
    @track error;
    @wire(initWrapper, {accId: '$recordId'}) 
            this.progWrap = data;
            this.error = error;

        var checkValue = event.target.value;
        var checkValue2;
        var programName = event.target.dataset.progName;

        if(checkValue === 'Spring / Semester 1'){
            checkValue = 'Spring';
            checkValue2 = 'Semester 1';
        else if(checkValue === 'Fall / Semester 2'){
            checkValue = 'Fall';
            checkValue2 = 'Semester 2';

        for(let i = 0; i < this.progWrap.progList.length; i++){
            if(this.progWrap.progList[i].programName === programName){
                for(let j = 0; j < this.progWrap.progList[i].checkboxes.length; j++){
                    if(this.progWrap.progList[i].checkboxes[j].section === checkValue){
                        this.progWrap.progList[i].checkboxes[j].checked = true;

Apex Wrappers:
public class wrapperClass{
        @AuraEnabled public List<progAuthWrapperClass> progList{get;set;}
        @AuraEnabled public List<String> sections{get;set;}
        @AuraEnabled public List<String> modifiedSections{get;set;}

    public class progAuthWrapperClass{
        @AuraEnabled public String programName {get;set;}
        @AuraEnabled public String programCountry {get;set;}
        @AuraEnabled public Program_Authorization__c progAuth {get;set;}
        @AuraEnabled public Boolean updated {get;set;}
        @AuraEnabled public Set<String> avaliableTerms {get;set;}
        @AuraEnabled public List<checkboxWrapper> checkboxes {get;set;}

    public class checkboxWrapper{
        @AuraEnabled public Boolean visible {get;set;}
        @AuraEnabled public Boolean checked {get;set;}
        @AuraEnabled public String section {get;set;}

    public static wrapperClass initWrapper(Id accId){
        wrapperClass returnWrapper = new wrapperClass();
        returnWrapper.sections = returnSections();
        returnWrapper.modifiedSections = returnModifiedSections(returnWrapper.sections);
        returnWrapper.progList = returnPrograms(accId);
        return returnWrapper;
The UI Looks like this currently (this is a work in progress):

User-added image

Essentially what we want to have happen is when on of these checkboxes is clicked, it updates the checked boolean on the checkboxWrapper. I thought I could update the this.progWrap.progList[i].checkboxes[j].checked in my for loop but everytime I do this I get an error from salesforce that says this: ['set' on proxy: trap returned falsish for property 'checked'].

This may be too much information but really my question is, what does that mean? and How do I actually update this field?

Thank you all for any help!
I tried using the 'For update' keyword in apex controller SOQL query for locking the set of records of a custom object. But it's not working fine for me. Please share some example code for the keyword use case.

I am facing an issue with the display of chinese characters on the PDF.Some of the chinese characters are not displaying properly
on usage of the renderAs attribute.

Basically I am getting the data from the rich text area and displaying on VF page using <apex:outputField> tag

Couples of links which I referred to fix the issue:


Issue is not resolved after using UTF-8 encoding and setting the body of the PDF with the font-family: 'Arial Unicode MS'.

Any help would be appreciated.

Thank you.

Is there a way to perform a "global search" through all Apex code --- classes, triggers, etc.?  For example, if I want to search for a specific block of code but don't remember what class it's in...

  • April 30, 2010
  • Like
  • 0
When I render a vf page normally with Chinese characters on it, everything works fine.  If I attempt to render it as a PDF however, the Chinese characters are skipped.
The challenge here is that we are rolled out globally, with hundreds of users in China.  A number of accounts and contacts are entered in Chinese. 
page rendered as HTML:
page rendered as PDF, missing the Account Name:
Is there any way to support multi-character sets when rendering to a PDF?
Jon Keener