• Joaquin Iudica
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
Hi, I'm sorry for posting this question without understanding the problem, but someone made changes to this pdf visualforce component and now it is throwing a markup error which i can't find , and SF doesn't specify this kind of errors. Any ideas why this is failing? Thanks a lot.

Visualforce page:
 
<apex:page renderAs="pdf" controller="PrintSalesElectronicInvoiceExpController" sidebar="false" showHeader="false" standardStylesheets="false" showChat="false" applyBodyTag="false" applyHtmlTag="false" cache="false" language="{!language}">
<head>
<style type="text/css">
@page { 
    margin-top: 350px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 105px;
    @top-center { 
        content: element(header); 
    }
    @bottom-center { 
        content: element(footer); 
    }
}
div.header {
    display: block;
    margin-top: 10px;
    margin-left:10px;
    position: running(header);
    font-family:arial,sans-serif;
}

div.footer {
    margin-left:10px;
    display: block;
    position: running(footer);
    font-family:arial,sans-serif;
}
.divPage {
    display: block;
    page-break-after: always;
    margin-top: 0px;
    /**height:350px;**/
}

.lastPage {
    display: block;
    margin-top: 0px;
    /*height:405px;*/
}

.report{
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
    width:100%;
    font-family:arial,sans-serif;
    margin-left:5px;
}

.vistaPrevia{
    text-align: center;
    width:100%;
    align-content: center;
}

</style>
</head>
<c:printSalesElectronicInvoiceExpCmp object_Id="{!objectId}" />

</apex:page>

Visualforce component:
 
<apex:component controller="PrintSalesElectronicInvoiceExpController" access="global" >
<apex:attribute name="object_Id" type="String" required="required" assignTo="{!objectId}" description="ID del pedido remito factura"/>

<div class="report">

<div class="header">
    <table border="0" cellspacing="0" cellspading="0" style="font-size:14px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;" width="100%">
        <tr>
            <td width="50%" style="padding-left:20px;font-size:11px;">
                <table width="100%" border="0" cellspacing="0" cellspading="0">
                    <tr>
                        <td style="font-size:20px;"><apex:image url="{!datosEmpresa.URL_logo__c}" rendered="{!!isVistaPrevia}"/></td>
                    </tr>
                    <tr>
                        <td><b>{!$Label.printSalesElectronicInvoiceExp_1}:&nbsp;{!datosEmpresa.ERPvs__Denominacion_o_Razon_Social__c}</b></td>
                    </tr>
                    <tr>
                        <td>{!$Label.printSalesElectronicInvoiceExp_2}:&nbsp;<apex:outputText value="{!wHeaderFooter.domicilioHeader}"/>&nbsp;-&nbsp;<apex:outputText value="{!wHeaderFooter.codigoPostalHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.localidadHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.provinciaHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.paisHeader}"/></td>
                    </tr>
                    <tr>
                        <td>{!$Label.printSalesElectronicInvoiceExp_3}&nbsp;<apex:outputText value="{!wHeaderFooter.telHeader}"/> </td>
                    </tr>
                    <tr>
                        <td><b>{!$Label.printSalesElectronicInvoiceExp_4}:&nbsp;IVA Responsable Inscripto</b></td>
                    </tr>
                </table>
            </td>
            <td width="10%" style="vertical-align: text-top;">
                <table border="0" cellspacing="0" cellspading="0">
                    <tr>
                        <td style="font-size:40px;"><b><apex:outputText value="{!wHeaderFooter.letra}"/></b></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;"><b>{!$Label.printSalesElectronicInvoiceExp_5}{!wHeaderFooter.codigoLetra}</b></td>
                    </tr>
                </table>
            </td>
            <td width="40%">
                <table border="0" cellspacing="0" cellspading="0" width="100%">
                    <tr>
                        <td style="font-size:12px;" colspan="2">
                            <b>
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 19 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_6}</apex:outputText> 
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 21 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_7}</apex:outputText> 
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 20 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_8}</apex:outputText> 
                            <apex:outputText value="{!TCVNombrePDF}" rendered="{!TCVNombrePDF != ''}"/>
                            </b>
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size:12px;">{!$Label.printSalesElectronicInvoiceExp_47}:&nbsp;<b><apex:outputText value="{!wHeaderFooter.numero}"/>
                        </b></td>
                        <td rowspan="3" style="text-align: right;">
                            <apex:outputPanel styleClass="vistaPrevia" rendered="{!isVistaPrevia}">
                            <table border="0" cellspacing="0" cellspading="0" width="100%">
                                <tr>
                                    <td style="font-size: 24px; font-weight: bold; text-align: center;">
                                        {!$Label.erpvs__printsaleselectronicinvoiceexp_9}
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-size: 11px; font-weight: bold; text-align: center;">
                                        {!$Label.erpvs__printsaleselectronicinvoiceexp_10}
                                    </td>
                                </tr>
                            </table>
                            </apex:outputPanel>
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;">{!$Label.printSalesElectronicInvoiceExp_11}:&nbsp;<apex:outputText value="{!wHeaderFooter.fecha}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2"><b>{!$Label.printSalesElectronicInvoiceExp_12}:</b>&nbsp;<apex:outputField value="{!datosEmpresa.Identificacion_Tributaria__c}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;"><b>{!$Label.printSalesElectronicInvoiceExp_13}:</b>&nbsp;<apex:outputField value="{!datosEmpresa.Otra_Identificacion_Tributaria__c}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2">{!$Label.printSalesElectronicInvoiceExp_14}:&nbsp;<apex:outputText value="{!wHeaderFooter.fechaInicioActividadesHeader}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2">{!$Label.printSalesElectronicInvoiceExp_15}</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_16}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.nombreCliente}"/></td>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_17}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.domicilioCliente}"/></td>
        </tr>
        <tr>
            <td><b>{!$Label.printSalesElectronicInvoiceExp_18}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.CUITPais}"/></td>
            <td></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <!--
        <tr>
            <td width="50%"><b>Currency:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.moneda}"/></td>
        </tr>
        -->
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_19}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.paisDestino}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_20}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.permisosEmbarque}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_21}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.puertoDestino}"/></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_22}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.condicionVenta}"/></td>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_23}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.incoterms}" /></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%" colspan="2"><apex:outputText value="{!wHeaderFooter.primeraLinea}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_24}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.shipper}"/></td>
            <td width="50%"><apex:outputText value="{!wHeaderFooter.comprobanteAsociado}" escape="false"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_25}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.brand}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_26}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.mv}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_27}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.destination}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_28}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.container}"/></td>
            <td width="50%"></td>
        </tr>
        
    </table>
    
</div>

<div class="footer">
    
    <apex:outputPanel rendered="{! NOT(isFacturaA) && !isVistaPrevia}" layout="none">
    
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <td width="50%">
                
            </td>
            <td width="50%">
                <table border="0" cellspacing="0" cellpadding="0" style="font-size:10px;padding-top:10px;padding-left:10px;" width="100%">
                    <tr>
                        <td>
                            <table border="0" cellspacing="0" cellpadding="0" style="text-align:right;padding-right:10px;" width="100%">
                                <tr>
                                    <td>
                                        <apex:image url="{!urlQR}" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-size:9px;">{!$Label.printSalesElectronicInvoiceExp_29}:&nbsp;<apex:outputText value="{!wHeaderFooter.cae}"/> - {!$Label.printSalesElectronicInvoiceExp_30}:&nbsp;<apex:outputText value="{!wHeaderFooter.fechaVencimientoCAE}"/></td>
                                </tr>
                                
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        
    </table>
    </apex:outputPanel>
</div>


<apex:repeat value="{!pages}" var="page" >
    <div class="{!IF(page < pagesQty, 'divPage', 'lastPage')}">
        <p style="font-size:10px;">
            <apex:outputPanel layout="none" rendered="{!NOT(agrupar)}">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td style="text-align:right;padding-right:4px;">{!$Label.printSalesElectronicInvoiceExp_31}</td>
                        <td style="padding-left:2px;" width="400px">{!$Label.printSalesElectronicInvoiceExp_32}</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.printSalesElectronicInvoiceExp_33}</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.printSalesElectronicInvoiceExp_34}(<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />)</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.erpvs__printsaleselectronicinvoiceexp_35}(<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />)</td>
                    </tr>
                    <tr style="display:{!IF(page > 1, 'inline', 'none')}; font-weight: bold;">
                        <td colspan="4" style="text-align: right;">
                            {!$Label.erpvs__printsaleselectronicinvoiceexp_36}:
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!subtotales[page-1]}"/>
                        </td>
                    </tr>
                    <apex:repeat value="{!items}" var="item" first="{!(QTY_PER_PAGE * (page-1))}" rows="{!QTY_PER_PAGE}">
                    <tr>
                        <td style="text-align:right;padding-right:4px;height:15px;">
                            <apex:outputText value="{!item.itemNumber}"/>
                        </td>
                        <td style="padding-left:2px;">
                            <apex:outputText value="{!item.description}" />
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.quantity}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_37}:&nbsp;<apex:outputText value="{!item.unidad}"/><br/>
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.unitPrice}" rendered="{! NOT(isFacturaA)}"/>
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.ammountPerItem}" />
                        </td>
                    </tr>
                    </apex:repeat>
                    
                </table>
            </apex:outputPanel>  
        </p>
        <apex:outputPanel rendered="{! NOT(isFacturaA) && (page < pagesQty)}" style="position: relative;" >
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:14px;border-style: solid; border-top-width: 1px; border-bottom-width: 1px;" >
                <tr>
                    <td width="50%"></td>
                    <td width="50%" style="text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_38}:</b>&nbsp;<apex:outputText value="{!subtotales[page]}"/></td>
                </tr>
            </table>
        </apex:outputPanel>
    </div>

    <apex:outputPanel layout="none" rendered="{! NOT(isFacturaA) && (page == pagesQty)}">
        <div style="width:100%;page-break-inside: avoid;position: fixed; bottom: 0px;">
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;" >
                <tr>
                    <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_39}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.exchangeRate}"/></td>
                    <td width="50%" style="text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_40}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.moneda}"/></td>
                </tr>
                <tr>
                    <td></td>
                    <td style="font-size:12px;text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_41}:&nbsp;<apex:outputText value="{!wHeaderFooter.simboloMoneda}" /> &nbsp;<apex:outputText value="{!totalDolares}"/></b></td>
                </tr>
            </table>
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
                <tr style="{!IF(wHeaderFooter.pallets == '0', 'display:none', '')}">
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.pallets}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_42}&nbsp;<apex:outputText value="{!wHeaderFooter.kgPallets} kg." rendered="{!wHeaderFooter.kgPallets != ''}"/></td>
                    <td width="50%"></td>
                </tr>
                <tr style="{!IF(wHeaderFooter.cartons == '0', 'display:none', '')}">
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.cartons}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_43}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.kgGrossWeight}" />&nbsp;{!$Label.printSalesElectronicInvoiceExp_44}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <!-- <td width="50%"><apex:outputText value="{!wHeaderFooter.kgNetWeight}" />&nbsp;{!$Label.printSalesElectronicInvoiceExp_45}</td> -->
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.kgNetWeight}" />&nbsp;{!unidades}&nbsp;{!IF(unidades == 'UNI', 'Quantity' , 'Net Weight')}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_46}&nbsp;<apex:outputText value="{! IF(tieneFlete, ' FOB', '') }" />&nbsp;<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />:</b>&nbsp;<apex:outputText value="{!totalFOB}"/></td>
                    <td width="50%"></td>
                </tr>
            </table>
            <p style="font-size: 9px;"><apex:outputText value="{!wHeaderFooter.cv.Texto_pie_FE__c}" rendered="{!wHeaderFooter.cv.Texto_pie_FE__c != null}"/> </p>
        </div>
    </apex:outputPanel>  
</apex:repeat>
    
</div>

</apex:component>

 
I don't know if there is a way to solve this, I couldn't find it.
I am importing a CSV file where I am to create an sObject for each line. The thing is, I have to do a query using a value present in the csv file, for example let's say 
value = 2554543

So, the query could be something like 
[SELECT Id FROM sObject WHERE Custom_Field__c = value]

BUT, the problem is , the values on that Custom_Field__c could be like this 
2554543

 or like this 
2-5545-43

.
How can I query against that field? Is it possible to only compare the numbers and ignore the other characters? (without having to create another string that represents the original value with the other format)
I'm testing filtered subscriptions to pushtopics with a test visualforce page. This is the code:

Controller:
 
public with sharing class PruebaPushTopicFiltradoController {

    public List<mlsales__Etiqueta_Zebra__c> etiquetas{get;set;}

    public PruebaPushTopicFiltradoController() {
        etiquetas = [SELECT Id, Documento_Id__c, Name, Identificacion_Impresora__c FROM Etiqueta_Zebra__c  ORDER BY Name LIMIT 5];
    }
}

Visualforce page:
<apex:page standardStylesheets="false" controller="PruebaPushTopicFiltradoController" showHeader="TRUE" sidebar="false">
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
    <div class="container">
        <table id="oppTable" class="table table-hover table-bordered table-striped">
            <thead>
                <tr>
                    <th>
                        Documento Id
                    </th>
                    <th>
                        Name
                    </th>
                    <th>
                        Identificacion Impresora
                    </th>  
                </tr>                      
            </thead>
            <tbody>
                <apex:repeat value="{!etiquetas}" var="etiqueta"> 
                    <tr>
                        <td>
                            {!etiqueta.Documento_Id__c}
                        </td>
                        <td>
                            {!etiqueta.Name}
                        </td>
                        <td>
                            {!etiqueta.Identificacion_Impresora__c}
                        </td>  
                    </tr>  
                </apex:repeat>
            </tbody>
        </table>
    </div>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>    
    <script src="{!URLFOR($Resource.jsUtilities, '/js/json2.js')}"></script>
    <script src="{!URLFOR($Resource.jsUtilities, '/js/cometd.js')}"></script>
    <script src="{!URLFOR($Resource.jsUtilities, '/js/jquery.cometd.js')}"></script>
    <script>
      // initizlizing Streaming API
      (function($) {
        $(document).ready(function() { 
          //Initializing cometd library to cometd endpoint
          $.cometd.init({
            url: window.location.protocol + '//' + window.location.hostname + '/cometd/33.0/',
            requestHeaders: {
              Authorization: 'OAuth {!$Api.Session_ID}'
            },
            appendMessageTypeToURL : false
          });

          // Subscribing to the push topic. 
          //JSON-encoded data will be returned in the callback each time whenever opportunity is created
          $.cometd.subscribe("/topic/getZebraToPrint?mlsales__Identificacion_Impresora__c='test'", function(message) {
            console.log(message);
            if (message.data.event.type == 'created') {
                console.log('created object ===> ' + message.data.sobject);
                var etiqueta = message.data.sobject; 
              $("#oppTable > tbody").append('<tr class="success"><td>'+etiqueta.mlsales__Documento_Id__c+'</td><td>'+etiqueta.Name+'</td><td>'+etiqueta.mlsales__Identificacion_Impresora__c+'</td></tr>');
            }
          });
          
        });
      })(jQuery)    
    </script>
</apex:page>

The string I'm passing as parameter for the subscribe method contains the filtering I need. the subscription works correctly, but doesn't filter, it gets all objects created despite whats the value of that field. Is the problem in the structure of the string, or doesn't it work this way? I can't find specific documentation for this. Any help is appreciated!
 
Hello everyone! I'm new to salesforce, and to development also, so I'm sorry if I'm not clear. I have to make a lightning web component that shows filters (created in apex). The component is not responsible for making the query, or to show the results, only the filters (another component would use this one, to get the filters with their values and then making the query). I made an apex class to test, what it does is creating some filters for the Account object, and then exporting them to be able to import from the LWC:
public static QueryFilters getFilters(){
        QueryFilters filters = new QueryFilters();

        filters.add(new QueryFilters.StringFilter(new QueryFilters.Field(Account.Name)));
        filters.add(new QueryFilters.InFilter(new QueryFilters.FieldOptions(Account.sobjectType, Account.Industry)));
        filters.add(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberOfEmployees, 'Empleados desde'), QueryFilters.Operator.GE));
        filters.add(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberOfEmployees, 'Empleados hasta'), QueryFilters.Operator.LE));
        filters.add(new QueryFilters.FilterWithOperators(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberofLocations__c))));
        filters.add(new QueryFilters.BooleanFilter(new QueryFilters.Field(Account.Tested__c)).selectize());
                
        return filters;
    }

    @AuraEnabled
    public static List<Map<String, Object>> getFiltersJson(){
        return QueryFilters.export((List<QueryFilters.ExportableFilter>)getFilters().filters);
    }
The method 'getFiltersJson) is auraenabled, and returns an export to be able to read it from the lwc. If you see, it is a list of map<String, Object>. How do I work with that method from the javascript file? What should I do to get its data?

This would be the html for the LWC (something of the sort):
<template>
    <lightning-card title="Filtros" icon-name="standard:account">
        <template iterator:it={filters}>
            <lightning-input
                 onchange={getValue}
                 key={it.value.label} 
                 if:true={it.value.isInput} 
                 type={it.value.type} 
                 label={it.value.label}>
            </lightning-input>
            <lightning-input
                onchange={getValue}
                key={it.value.label}
                if:true={it.value.isBoolean}
                type={it.value.type}
                label={it.value.label}>
            </lightning-input>
            <c-lwc-multi-select
                onchange={handleOnChange}
                key={it.value.label}
                if:true={it.value.isMultiSelect}
                label={it.value.label}
                options={it.value.options}>
            </c-lwc-multi-select>
        </template>
    </lightning-card>
</template>
Hello everyone! I'm new to salesforce, and to development also, so I'm sorry if I'm not clear. I have to make a lightning web component that shows filters (created in apex). The component is not responsible for making the query, or to show the results, only the filters (another component would use this one, to get the filters with their values and then making the query). I made an apex class to test, what it does is creating some filters for the Account object, and then exporting them to be able to import from the LWC:
public static QueryFilters getFilters(){
        QueryFilters filters = new QueryFilters();

        filters.add(new QueryFilters.StringFilter(new QueryFilters.Field(Account.Name)));
        filters.add(new QueryFilters.InFilter(new QueryFilters.FieldOptions(Account.sobjectType, Account.Industry)));
        filters.add(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberOfEmployees, 'Empleados desde'), QueryFilters.Operator.GE));
        filters.add(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberOfEmployees, 'Empleados hasta'), QueryFilters.Operator.LE));
        filters.add(new QueryFilters.FilterWithOperators(new QueryFilters.NumberFilter(new QueryFilters.Field(Account.NumberofLocations__c))));
        filters.add(new QueryFilters.BooleanFilter(new QueryFilters.Field(Account.Tested__c)).selectize());
                
        return filters;
    }

    @AuraEnabled
    public static List<Map<String, Object>> getFiltersJson(){
        return QueryFilters.export((List<QueryFilters.ExportableFilter>)getFilters().filters);
    }
The method 'getFiltersJson) is auraenabled, and returns an export to be able to read it from the lwc. If you see, it is a list of map<String, Object>. How do I work with that method from the javascript file? What should I do to get its data?

This would be the html for the LWC (something of the sort):
<template>
    <lightning-card title="Filtros" icon-name="standard:account">
        <template iterator:it={filters}>
            <lightning-input
                 onchange={getValue}
                 key={it.value.label} 
                 if:true={it.value.isInput} 
                 type={it.value.type} 
                 label={it.value.label}>
            </lightning-input>
            <lightning-input
                onchange={getValue}
                key={it.value.label}
                if:true={it.value.isBoolean}
                type={it.value.type}
                label={it.value.label}>
            </lightning-input>
            <c-lwc-multi-select
                onchange={handleOnChange}
                key={it.value.label}
                if:true={it.value.isMultiSelect}
                label={it.value.label}
                options={it.value.options}>
            </c-lwc-multi-select>
        </template>
    </lightning-card>
</template>
Hi, I'm sorry for posting this question without understanding the problem, but someone made changes to this pdf visualforce component and now it is throwing a markup error which i can't find , and SF doesn't specify this kind of errors. Any ideas why this is failing? Thanks a lot.

Visualforce page:
 
<apex:page renderAs="pdf" controller="PrintSalesElectronicInvoiceExpController" sidebar="false" showHeader="false" standardStylesheets="false" showChat="false" applyBodyTag="false" applyHtmlTag="false" cache="false" language="{!language}">
<head>
<style type="text/css">
@page { 
    margin-top: 350px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 105px;
    @top-center { 
        content: element(header); 
    }
    @bottom-center { 
        content: element(footer); 
    }
}
div.header {
    display: block;
    margin-top: 10px;
    margin-left:10px;
    position: running(header);
    font-family:arial,sans-serif;
}

div.footer {
    margin-left:10px;
    display: block;
    position: running(footer);
    font-family:arial,sans-serif;
}
.divPage {
    display: block;
    page-break-after: always;
    margin-top: 0px;
    /**height:350px;**/
}

.lastPage {
    display: block;
    margin-top: 0px;
    /*height:405px;*/
}

.report{
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
    width:100%;
    font-family:arial,sans-serif;
    margin-left:5px;
}

.vistaPrevia{
    text-align: center;
    width:100%;
    align-content: center;
}

</style>
</head>
<c:printSalesElectronicInvoiceExpCmp object_Id="{!objectId}" />

</apex:page>

Visualforce component:
 
<apex:component controller="PrintSalesElectronicInvoiceExpController" access="global" >
<apex:attribute name="object_Id" type="String" required="required" assignTo="{!objectId}" description="ID del pedido remito factura"/>

<div class="report">

<div class="header">
    <table border="0" cellspacing="0" cellspading="0" style="font-size:14px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;" width="100%">
        <tr>
            <td width="50%" style="padding-left:20px;font-size:11px;">
                <table width="100%" border="0" cellspacing="0" cellspading="0">
                    <tr>
                        <td style="font-size:20px;"><apex:image url="{!datosEmpresa.URL_logo__c}" rendered="{!!isVistaPrevia}"/></td>
                    </tr>
                    <tr>
                        <td><b>{!$Label.printSalesElectronicInvoiceExp_1}:&nbsp;{!datosEmpresa.ERPvs__Denominacion_o_Razon_Social__c}</b></td>
                    </tr>
                    <tr>
                        <td>{!$Label.printSalesElectronicInvoiceExp_2}:&nbsp;<apex:outputText value="{!wHeaderFooter.domicilioHeader}"/>&nbsp;-&nbsp;<apex:outputText value="{!wHeaderFooter.codigoPostalHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.localidadHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.provinciaHeader}"/>,&nbsp;<apex:outputText value="{!wHeaderFooter.paisHeader}"/></td>
                    </tr>
                    <tr>
                        <td>{!$Label.printSalesElectronicInvoiceExp_3}&nbsp;<apex:outputText value="{!wHeaderFooter.telHeader}"/> </td>
                    </tr>
                    <tr>
                        <td><b>{!$Label.printSalesElectronicInvoiceExp_4}:&nbsp;IVA Responsable Inscripto</b></td>
                    </tr>
                </table>
            </td>
            <td width="10%" style="vertical-align: text-top;">
                <table border="0" cellspacing="0" cellspading="0">
                    <tr>
                        <td style="font-size:40px;"><b><apex:outputText value="{!wHeaderFooter.letra}"/></b></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;"><b>{!$Label.printSalesElectronicInvoiceExp_5}{!wHeaderFooter.codigoLetra}</b></td>
                    </tr>
                </table>
            </td>
            <td width="40%">
                <table border="0" cellspacing="0" cellspading="0" width="100%">
                    <tr>
                        <td style="font-size:12px;" colspan="2">
                            <b>
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 19 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_6}</apex:outputText> 
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 21 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_7}</apex:outputText> 
                            <apex:outputText rendered="{!wHeaderFooter.cv.Codigo_afip__c == 20 && TCVNombrePDF == ''}">{!$Label.erpvs__printsaleselectronicinvoiceexp_8}</apex:outputText> 
                            <apex:outputText value="{!TCVNombrePDF}" rendered="{!TCVNombrePDF != ''}"/>
                            </b>
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size:12px;">{!$Label.printSalesElectronicInvoiceExp_47}:&nbsp;<b><apex:outputText value="{!wHeaderFooter.numero}"/>
                        </b></td>
                        <td rowspan="3" style="text-align: right;">
                            <apex:outputPanel styleClass="vistaPrevia" rendered="{!isVistaPrevia}">
                            <table border="0" cellspacing="0" cellspading="0" width="100%">
                                <tr>
                                    <td style="font-size: 24px; font-weight: bold; text-align: center;">
                                        {!$Label.erpvs__printsaleselectronicinvoiceexp_9}
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-size: 11px; font-weight: bold; text-align: center;">
                                        {!$Label.erpvs__printsaleselectronicinvoiceexp_10}
                                    </td>
                                </tr>
                            </table>
                            </apex:outputPanel>
                        </td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;">{!$Label.printSalesElectronicInvoiceExp_11}:&nbsp;<apex:outputText value="{!wHeaderFooter.fecha}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2"><b>{!$Label.printSalesElectronicInvoiceExp_12}:</b>&nbsp;<apex:outputField value="{!datosEmpresa.Identificacion_Tributaria__c}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;"><b>{!$Label.printSalesElectronicInvoiceExp_13}:</b>&nbsp;<apex:outputField value="{!datosEmpresa.Otra_Identificacion_Tributaria__c}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2">{!$Label.printSalesElectronicInvoiceExp_14}:&nbsp;<apex:outputText value="{!wHeaderFooter.fechaInicioActividadesHeader}"/></td>
                    </tr>
                    <tr>
                        <td style="font-size:11px;" colspan="2">{!$Label.printSalesElectronicInvoiceExp_15}</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_16}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.nombreCliente}"/></td>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_17}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.domicilioCliente}"/></td>
        </tr>
        <tr>
            <td><b>{!$Label.printSalesElectronicInvoiceExp_18}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.CUITPais}"/></td>
            <td></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <!--
        <tr>
            <td width="50%"><b>Currency:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.moneda}"/></td>
        </tr>
        -->
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_19}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.paisDestino}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_20}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.permisosEmbarque}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_21}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.puertoDestino}"/></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_22}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.condicionVenta}"/></td>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_23}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.incoterms}" /></td>
        </tr>
    </table>
    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
        <tr>
            <td width="50%" colspan="2"><apex:outputText value="{!wHeaderFooter.primeraLinea}"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_24}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.shipper}"/></td>
            <td width="50%"><apex:outputText value="{!wHeaderFooter.comprobanteAsociado}" escape="false"/></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_25}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.brand}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_26}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.mv}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_27}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.destination}"/></td>
            <td width="50%"></td>
        </tr>
        <tr>
            <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_28}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.container}"/></td>
            <td width="50%"></td>
        </tr>
        
    </table>
    
</div>

<div class="footer">
    
    <apex:outputPanel rendered="{! NOT(isFacturaA) && !isVistaPrevia}" layout="none">
    
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <td width="50%">
                
            </td>
            <td width="50%">
                <table border="0" cellspacing="0" cellpadding="0" style="font-size:10px;padding-top:10px;padding-left:10px;" width="100%">
                    <tr>
                        <td>
                            <table border="0" cellspacing="0" cellpadding="0" style="text-align:right;padding-right:10px;" width="100%">
                                <tr>
                                    <td>
                                        <apex:image url="{!urlQR}" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="font-size:9px;">{!$Label.printSalesElectronicInvoiceExp_29}:&nbsp;<apex:outputText value="{!wHeaderFooter.cae}"/> - {!$Label.printSalesElectronicInvoiceExp_30}:&nbsp;<apex:outputText value="{!wHeaderFooter.fechaVencimientoCAE}"/></td>
                                </tr>
                                
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        
    </table>
    </apex:outputPanel>
</div>


<apex:repeat value="{!pages}" var="page" >
    <div class="{!IF(page < pagesQty, 'divPage', 'lastPage')}">
        <p style="font-size:10px;">
            <apex:outputPanel layout="none" rendered="{!NOT(agrupar)}">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td style="text-align:right;padding-right:4px;">{!$Label.printSalesElectronicInvoiceExp_31}</td>
                        <td style="padding-left:2px;" width="400px">{!$Label.printSalesElectronicInvoiceExp_32}</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.printSalesElectronicInvoiceExp_33}</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.printSalesElectronicInvoiceExp_34}(<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />)</td>
                        <td style="text-align:right;padding-right:2px;">{!$Label.erpvs__printsaleselectronicinvoiceexp_35}(<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />)</td>
                    </tr>
                    <tr style="display:{!IF(page > 1, 'inline', 'none')}; font-weight: bold;">
                        <td colspan="4" style="text-align: right;">
                            {!$Label.erpvs__printsaleselectronicinvoiceexp_36}:
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!subtotales[page-1]}"/>
                        </td>
                    </tr>
                    <apex:repeat value="{!items}" var="item" first="{!(QTY_PER_PAGE * (page-1))}" rows="{!QTY_PER_PAGE}">
                    <tr>
                        <td style="text-align:right;padding-right:4px;height:15px;">
                            <apex:outputText value="{!item.itemNumber}"/>
                        </td>
                        <td style="padding-left:2px;">
                            <apex:outputText value="{!item.description}" />
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.quantity}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_37}:&nbsp;<apex:outputText value="{!item.unidad}"/><br/>
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.unitPrice}" rendered="{! NOT(isFacturaA)}"/>
                        </td>
                        <td style="text-align:right;padding-right:2px;">
                            <apex:outputText value="{!item.ammountPerItem}" />
                        </td>
                    </tr>
                    </apex:repeat>
                    
                </table>
            </apex:outputPanel>  
        </p>
        <apex:outputPanel rendered="{! NOT(isFacturaA) && (page < pagesQty)}" style="position: relative;" >
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:14px;border-style: solid; border-top-width: 1px; border-bottom-width: 1px;" >
                <tr>
                    <td width="50%"></td>
                    <td width="50%" style="text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_38}:</b>&nbsp;<apex:outputText value="{!subtotales[page]}"/></td>
                </tr>
            </table>
        </apex:outputPanel>
    </div>

    <apex:outputPanel layout="none" rendered="{! NOT(isFacturaA) && (page == pagesQty)}">
        <div style="width:100%;page-break-inside: avoid;position: fixed; bottom: 0px;">
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;" >
                <tr>
                    <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_39}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.exchangeRate}"/></td>
                    <td width="50%" style="text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_40}:</b>&nbsp;<apex:outputText value="{!wHeaderFooter.moneda}"/></td>
                </tr>
                <tr>
                    <td></td>
                    <td style="font-size:12px;text-align:right;padding-right:2px;"><b>{!$Label.printSalesElectronicInvoiceExp_41}:&nbsp;<apex:outputText value="{!wHeaderFooter.simboloMoneda}" /> &nbsp;<apex:outputText value="{!totalDolares}"/></b></td>
                </tr>
            </table>
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-left:20px;font-size:10px;border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
                <tr style="{!IF(wHeaderFooter.pallets == '0', 'display:none', '')}">
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.pallets}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_42}&nbsp;<apex:outputText value="{!wHeaderFooter.kgPallets} kg." rendered="{!wHeaderFooter.kgPallets != ''}"/></td>
                    <td width="50%"></td>
                </tr>
                <tr style="{!IF(wHeaderFooter.cartons == '0', 'display:none', '')}">
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.cartons}"/>&nbsp;{!$Label.printSalesElectronicInvoiceExp_43}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.kgGrossWeight}" />&nbsp;{!$Label.printSalesElectronicInvoiceExp_44}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <!-- <td width="50%"><apex:outputText value="{!wHeaderFooter.kgNetWeight}" />&nbsp;{!$Label.printSalesElectronicInvoiceExp_45}</td> -->
                    <td width="50%"><apex:outputText value="{!wHeaderFooter.kgNetWeight}" />&nbsp;{!unidades}&nbsp;{!IF(unidades == 'UNI', 'Quantity' , 'Net Weight')}</td>
                    <td width="50%"></td>
                </tr>
                <tr>
                    <td width="50%"><b>{!$Label.printSalesElectronicInvoiceExp_46}&nbsp;<apex:outputText value="{! IF(tieneFlete, ' FOB', '') }" />&nbsp;<apex:outputText value="{!wHeaderFooter.simboloMoneda}" />:</b>&nbsp;<apex:outputText value="{!totalFOB}"/></td>
                    <td width="50%"></td>
                </tr>
            </table>
            <p style="font-size: 9px;"><apex:outputText value="{!wHeaderFooter.cv.Texto_pie_FE__c}" rendered="{!wHeaderFooter.cv.Texto_pie_FE__c != null}"/> </p>
        </div>
    </apex:outputPanel>  
</apex:repeat>
    
</div>

</apex:component>