• ASHOK RAJ R 18
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
Hi,
I have added a button on LWC, on click of that button one modal is getting opened.
There are few fields(text and picklist fields) and combobox on that modal.
In picklist field and combobox, there are more than 10 LOVs.
When I open the modal, I am not able to scroll till the last value in picklist and combobox. 
Sharing code below:
contactModal.html
<template>
    <lightning-card > 
        <lightning-button label="Open Modal" onclick={openmodal}></lightning-button>
            
        <div class="slds-theme_default">                      
                <template if:true={openmodel}>
                <div class="demo-only" style="height: 640px; width:110% !important;">
                    <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
                        <div class="slds-modal__container">
                            <header class="slds-modal__header">
                                <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closeModal}>
                                    <lightning-icon icon-name="utility:close" size="medium">
                                    </lightning-icon>
                                    <span class="slds-assistive-text">Close</span>
                                </button>
                                <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Project Score Details</h2>
                            </header>
                            <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                                    <lightning-record-edit-form record-id="0030o00002nBlsDAAS"
                                            object-api-name="Contact"><!-- any test contact id-->
                                        <lightning-messages>
                                        </lightning-messages>
                                        <div class="slds-grid slds-gutters">
                                             <div class="slds-col">
                                                <lightning-output-field field-name="AccountId">
                                                </lightning-output-field>
                                                <lightning-input-field field-name="FirstName">
                                                </lightning-input-field>
                                                <lightning-input-field field-name="Lightning_pack__Level__c">
                                                </lightning-input-field>
                                                
                                            </div>
                                            <div class="slds-col">
                                                <lightning-input-field field-name="LastName">
                                                </lightning-input-field>
                                                <lightning-input-field field-name="Email">
                                                </lightning-input-field>
                                                <lightning-combobox
                                                name="progress1"
                                                label="Status"
                                                value={value}
                                                placeholder="Select Progress"
                                                options={options}
                                                onchange={handleChange} ></lightning-combobox>
                                            </div>
                                        </div>
                                        <lightning-button
                                            class="slds-m-top_small"
                                            variant="brand"
                                            type="submit"
                                            name="update"
                                            label="Update" onclick={saveMethod}>
                                        </lightning-button>
                                    </lightning-record-edit-form>
                                </div>
                               
                        </div>
                    </section>
                    <div class="slds-backdrop slds-backdrop_open"></div>
                </div>
                </template>
            </div>
    </lightning-card>
</template>
contactModal.js
import { LightningElement, track, api} from 'lwc';


export default class contactModal extends LightningElement {
    @api recordId;
    
    get options() {
        return [
            { label: 'New', value: 'new' },
            { label: 'In Progress', value: 'inProgress' },
            { label: 'Option1', value: 'Option1' },
            { label: 'Option2', value: 'Option2' },
            { label: 'Option3', value: 'Option3' },
            { label: 'Option4', value: 'Option4' },
            { label: 'Option5', value: 'Option5' },
            { label: 'Option6', value: 'Option6' },
            { label: 'Option7', value: 'Option7' },
            { label: 'Option8', value: 'Option8' },
            { label: 'Option9', value: 'Option9' },
            { label: 'Option10', value: 'Option10' },
        ];
    }
    
     @track openmodel = false;
    openmodal() {
        this.openmodel = true
    }
    closeModal() {
        this.openmodel = false
    } 
    saveMethod() {
        this.closeModal();
    }
}
I can see only one value in Picklist and same for combo-box.
User-added image

I tried adding below css:
contactModal.css
.slds-modal__content{
    overflow: initial;
}
I am able to see more values now, but not all.
I have LOVs till Level 10, now I can see till Level 5.User-added imageI tried adding scrollable to slds-modal__content or for combo-box/field.
It is not working.
Please provide some solution for this.
Thanks in advance.


 
While trying to push code using SFDX. I am getting below error. Please help if any one faced this error.


WARNING: apiVersion configuration overridden at 44.0
PROJECT PATH ERROR
──────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
N/A An object 'OrgComparer' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory
02:26:12.128 sfdx force:source:push ended with exit code 1
Hi All.

I am getting the following error on my trigger:
ERROR: AddOnTrigger: execution of AfterInsertcaused by: System.StringException: Invalid id: 9 External entry point
Any thoughts? Code is below. You can see my Objects are Contact(Standard), AddOn(Custom), Dev_AddOn(CustomJunction)

I am trying to write a trigger that will create the junction records from the Contact object and the AddOn object after the AddOn objects are created and edited. There are custom ID fields that I created as well so I will not be using the 

I am not a developer by trade and I got this far with the code because of the help from someone from the Community. Would appreciate any help in pointing me in the right direction. At this point, based on the error Im getting, I am not sure what next investigatory steps to take to rectify the code/problem.

Thank you very much for your time.
 
trigger AddOnTrigger on AddOn__c (after insert, after edit) {
    List<Dev_AddOn__c> aOBList = new List<Dev_AddOn__c>();
    
    
    Set<String> accIdSet = new Set<String>();
    
    for(AddOn__c obj: Trigger.new) {
        if(obj.ContactID_Values__c != null && obj.ContactID_Values__c != '') {
            List<String> accIdList = obj.ContactID_Values__c.split(',');
            accIdSet.addAll(accIdList);
        }
    }
    
    if(!accIdSet.isEmpty()) {
        Map<Id, Contact> accMap = new Map<Id, Contact>([Select Id, Name from Contact where Id IN: accIdSet]);
        for(AddOn__c obj: Trigger.new) {
            if(obj.ContactID_Values__c != null && obj.ContactID_Values__c != '') {
                List<String> accIdList = obj.ContactID_Values__c.split(',');
                
                for(String accId: accIdList)  {
                    if(accMap.get(accId) != null) {
                        Contact acc = accMap.get(accId);
                        Dev_AddOn__c aOB = new Dev_AddOn__c();
                        aOB.Name = obj.Name+' '+acc.Name;
                        aOB.AddOn__c = obj.Id;
                        aOB.Contact__c = acc.Id; 
                        aOBList.add(aOB);
                    }
                }
            }
        }
        
        if(!aOBList.isEmpty()) {
            insert aOBList;
        }
    }
}



 

I'm getting the error:

 

Error: package.xml(purchase__c): An object 'purchase__c' of type CustomObject was named in package.xml, but was not found in zipped directory.  In the deployTest directory, I have the package.xml file below and an objects folder.  Inside the objects folder, I have a file Purchase__c.object which was retrieved from the org I'm copying metadata from.  What am I missing?  Also, do I have to name all the custom fields?  I thought I could just deploy the custom object but when I tried that it gave me errors saying that the package.xml file didn't contain all the custom fields.  Thanks.

 

package.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>purchase__c</members>
        <name>CustomObject</name>
    </types>
  <types>
    <members>Purchase__c.Admin_Fee__c</members>
    <members>Purchase__c.Affiliated__c</members>
    <members>Purchase__c.Amount__c</members>
    <members>Purchase__c.Comments__c</members>
    <members>Purchase__c.Fee__c</members>
    <members>Purchase__c.Fiscal_Year__c</members>
    <members>Purchase__c.Member__c</members>
    <members>Purchase__c.Other_Fee__c</members>
    <members>Purchase__c.PurchaseID__c</members>
    <members>Purchase__c.Report_Date__c</members>
    <members>Purchase__c.Report_Total__c</members>
    <members>Purchase__c.Type__c</members>
    <members>Purchase__c.VendorType__c</members>
    <members>Purchase__c.Vendor__c</members>
    <members>Purchase__c.Write_Off__c</members>
    <name>CustomField</name>
  </types>
    <version>22.0</version>
</Package>

 build.xml:

 

<project name="Sample usage of Salesforce Ant tasks" default="purchase" basedir="." xmlns:sf="antlib:com.salesforce">

    <property file="build.properties"/>
    <property environment="env"/>

  <target name="purchase">
    <!-- Upload the contents of the "mypkg" package -->
    <sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" deployRoot="deployTest"/>
  </target>
</project>