• Auler Cordoba
  • NEWBIE
  • 10 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 2
    Replies
I don't understand this: I have a site that works fine when its url has "/apex/..." but when I use another link, which should be the default one that I will share at the end, it gives me an error. does anyone know why?


In this, we can see the data (in this site, the URL have ".../apex/..")

But to visualize that page, I need to make the login. And I don't want to do login to visualize the data.
In this site (the external site) I can't to see the data. I have this error:
User-added imageI have this error message: "duplicate value found: <unknown> duplicates value on record with id: <unknown>" in the line 0, as you can see in the picture. 

I really doesn't understand why ... 
Hi community,

I am new at this.

My data model is as follows:

Salesforce Certification 1 ---- n Certification Held n ----- 1 Account

Data Model

So Certification_Held__c is my junction object between Salesforce_Certification__c and Account, since I have an n-n (many to many)

So far so good. Then, what I need is to make a trigger where it tells me how many Certifications (that is, I must use Certification Held) each Account has. This should happen every time the user does an update, insert, or delete.

It seems simple to me, but I can't do it.

So far what I have done has not given me the result I want....
 
Hi community,

I am new at this.

My data model is as follows:

Salesforce Certification 1 ---- n Certification Held n ----- 1 Account

Data Model

So Certification_Held__c is my junction object between Salesforce_Certification__c and Account, since I have an n-n (many to many)

So far so good. Then, what I need is to make a trigger where it tells me how many Certifications (that is, I must use Certification Held) each Account has. This should happen every time the user does an update, insert, or delete.

It seems simple to me, but I can't do it.

So far what I have done has not given me the result I want....
 
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>