• Stéphane C
  • NEWBIE
  • 45 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 4
    Replies
Hello,
I'm developing a new version of a Managed package already installed on client's organizations.

When I try to install the new version (as beta on a sandbox) it says "Missing Organization Feature: DataDotComClean".
On the package manager I see that "Data.com Clean" is auto-detected as required by Salesforce so I can't uncheck it.

I tried to install the previous version on the same sandbox and it's worked so Data.com Clean is not required for the previous version.
Between the two versions I have added/updated Apex class, LWC and Custom objects. Nothing really special.

I don't know Data.com Clean so I don't really get what could make it required.

If you have already experimented this or if you have some ideas I'll be glad to read them.

Thank you !
 
Hello,
So I'm trying to use navigation with Lightning Web Components on the Community. I'd like to navigate to the Case List View and set up this view automatically to a certain filter.

The navigation code I use :
this[NavigationMixin.Navigate]({
   type: 'standard__objectPage',
   attributes:
   {
      objectApiName: 'Case',
      actionName: 'list',
   },
   state:
   {
      filterName: '00B1o000005X6Z0EAK'
   }
});

As said in the doc, filterName identifies the target list view so I set the Id of my ListView (I tried with different one).

My issue is that it's always redirect me to the same ListView whatever I do (excepting an "invalidate page" when what is set is nonsense).

Thank you.

Hello,

I have made a managed packaged that I installed on a custom sandbox as a beta for tests. Then I tried to uninstall it for installing a new version and the uninstall process said on an automated e-mail that a certain picklist value set of the managed package can't be uninstall because :

"null: This global picklist is used by 1 or more custom fields. Remove the usage and try again."

So I checked directly on the value set where it is used and here is the problem : The only use is on a custom field of a custom object that belongs the managed packaged I'm trying to uninstall.

I obviously can't change this field before uninstall because it comes from the managed package so I don't have any idea for this issue.

Any idea ?
Hello,

I'm trying the RestRessource functionality in Apex and I'm facing a "service not found" every time. Here's how I do it :

First, I create a simple Apex class that return "Hello World" on a GET request.
@RestResource(urlMapping='/test/*')
global with sharing class ApexRestTest {

    @HttpGet
    global static String getMethod()
    {
        return 'Hello World';
    }    
}
Then after saving I go to the workbench connect to the right Organization as Administrator and in the "utilities > REST explorer" I perform this request :
  • GET
  • /services/apexrest/test/123
The response is the following (with the 404 code):
[ {
  "errorCode" : "NOT_FOUND",
  "message" : "Could not find a match for URL"
} ]
On the trailhead it just looks as easy as I did so I don't understand what's wrong.

If any of you have a solution !
 
Hi !

I'am trying to make a callout to a remote site api. This api is called with the url https://api.insee.fr/entreprises/sirene/V3/siren and the method GET.

I played with this api using RESTer and POSTMAN and it's worked fine. When I implemented it with APEX, the call systematically returns 405 Method Not Allowed.  I'm using the right URL and method but it keeps this answer. The site is allowed as a remote site.

Here is some APEX :
 
public static HTTPResponse HttpCall(String endpoint, String protocol, Map<String, String> mapHeaders, String strBody, Integer timeout)
    {
            HttpRequest req = new HttpRequest();
            req.setEndpoint(endpoint);
            req.setMethod(protocol);

        	if(timeout!= null)
                req.setTimeout(timeout); 
            
            if(mapHeaders != null)
                for(String headerkey : mapHeaders.keyset())
                    req.setHeader(headerkey, mapHeaders.get(headerkey));        
            
            if(strBody != null)
                req.setBody(strBody);
            
            system.debug(req);
            Http http = new Http();
            return http.send(req);
    }

    public static void queryBySiren()
    {        
        system.debug('QUERY BY SIREN:');
		String endpoint = 'https://api.insee.fr/entreprises/sirene/V3/siren';
		String protocol = 'GET';
		Map<String, String> headers = new Map<String, String>();
        String body = '';
        Integer timeout = 50000;
        HTTPResponse resp = SireneRequest.HttpCall(endpoint, protocol, headers, body, timeout);
        
        system.assert('OK' == resp.getStatus(), 'Request error : ' + resp.getstatusCode() + ' ' + resp.getStatus());
    }
Because it's working on RESTer and POSTMAN i'am a litle bit confused.

PS : Instead of returning 405 the api should return 401. Obviously i didn't enter credentials for some reasons ;)
Hey,

I developed a lightning component using the "Expandable Section" from SLDS. I achieve to make it open/close thanks to JS controller.

My issue is that I don't have the same animation that happen on a classic record Detail tab. I'm able to do my one animation, but I prefer to use SLDS as much as I can.

Here is my component :
<aura:attribute name="isOpen" type="Boolean" default="true"
                    description="the section is open (true), else (false)"/>
    
    <div class="{!v.isOpen == true ? 'slds-section slds-is-open' : 'slds-section slds-is-close'}">
        <h3 class="slds-section__title">
            <button aria-controls="expando-unique-id" aria-expanded="true" class="slds-button slds-section__title-action"
                    onclick="{!c.handleClick}">
                <span class="slds-truncate" title="Section Title">Section Title</span>
            </button>
        </h3>
        <div aria-hidden="false" class="slds-section__content" id="expando-unique-iddddd">
            <p>Content goes here</p>
        </div>
    </div>
and the controller :
handleClick : function(component, event, helper)
{
	component.set('v.isOpen', !component.get('v.isOpen'));
}

Thanks for your help

The Expandable Section Doc : https://www.lightningdesignsystem.com/components/expandable-section/
Hey !

I'm trying the new lightning:map tag from the winter 19 and i'm having some issue.

I achieve to display a simple map filled with a list of objects. They are shown as markers on the map and also on a sidebar generate by the lightning:tag too (the "showFooter" parameter).

Problems : 

1) When i'm changing the list, changes appear on the sidebar but markers on the map don't change (none appears or disappears).

2) When i have a list of 1 or less markers to show, the sidebar desapears. But if after i reset the list to 2 or more, the sidebar doesn't reappear.

I did a simplified code that show the problem :

component :
<aura:component>
    <!-- attributes -->
    <aura:attribute name="mapMarkers" type="Object"/>
    <aura:attribute name="markersTitle" type="String" />
    <aura:attribute name="showFooter" type="Boolean" />
    <aura:attribute name="center" type="Object" />
    <aura:attribute name="zoomLevel" type="Integer" />

    <!-- initialize map and "simulate" checkbox as clicked to fill the list -->
    <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    <aura:handler name="init" value="{! this }" action="{! c.checkboxChanged }"/>

    <div>
        <lightning:input type="checkbox" name="checkbox" label="Change" aura:id="checkbox" onchange="{!c.checkboxChanged}"/>
        <lightning:button label="Clear" onclick="{!c.clear}"/>

        <lightning:map
                       mapMarkers="{! v.mapMarkers }"
                       center="{! v.center }"
                       zoomLevel="{! v.zoomLevel }"
                       markersTitle="{! v.markersTitle }"
                       showFooter="{ !v.showFooter }" >
        </lightning:map>
    </div>
</aura:component>
({
    init : function(component, event, helper)
    {
        //initialize the map
        component.set('v.center', {
            location: {
                City: 'Fréjus'
            }
        });
        
        component.set('v.zoomLevel', 9);
        component.set('v.markersTitle', 'Some people');
        component.set('v.showFooter', true);
    },
    checkboxChanged : function(component, event, helper)
    {
        //swap between two lists of markers
        var check = component.find('checkbox').get('v.checked')
        
        if(check == true) //list 1
        {
            component.set("v.mapMarkers", [
            {
                location: {
                    City: 'Cap-d\'Ail',
                    Country: 'France',
                },

                icon: 'custom:custom26',
                title: 'Cap-d\'Ail'
            },
            {
                location: {
                    City: 'Beaulieu-sur-Mer',
                    Country: 'France',
                },

                icon: 'custom:custom96',
                title: 'Beaulieu-sur-Mer'
            }]);
        }
        else //list 2
        {
            component.set("v.mapMarkers", [{
                location: {
                    City: 'Fréjus',
                    Country: 'France',
                },

                icon: 'custom:custom88',
                title: 'Fréjus'
            },
            {
                location: {
                    City: 'Sainte-Maxime',
                    Country: 'France',
                },

                icon: 'custom:custom92',
                title: 'Sainte-Maxime'
            },
            {
                location: {
                    City: 'Saint-Tropez',
                    Country: 'France',
                },

                icon: 'custom:custom26',
                title: 'Saint-Tropez'
            }
        	]);
        }
    },
    clear : function(component, event, helper)
    {
        //clear the current list showed
        component.set("v.mapMarkers", new Array());
    }
})

I know it's early to have much information about it, but this tag is really interesting.

Thanks for any help !
Hey !

In the new Winter 19  I see a new tag called lightning:map that automatically show a google map. I wanted to try it on a test organisation, but I didn't find any documentation or clear example about how use it (how to add a marker for example). I have just achieved to display the map.

If any of you got something ! ^^
Hello,
I'm developing a new version of a Managed package already installed on client's organizations.

When I try to install the new version (as beta on a sandbox) it says "Missing Organization Feature: DataDotComClean".
On the package manager I see that "Data.com Clean" is auto-detected as required by Salesforce so I can't uncheck it.

I tried to install the previous version on the same sandbox and it's worked so Data.com Clean is not required for the previous version.
Between the two versions I have added/updated Apex class, LWC and Custom objects. Nothing really special.

I don't know Data.com Clean so I don't really get what could make it required.

If you have already experimented this or if you have some ideas I'll be glad to read them.

Thank you !
 
Hi !

I'am trying to make a callout to a remote site api. This api is called with the url https://api.insee.fr/entreprises/sirene/V3/siren and the method GET.

I played with this api using RESTer and POSTMAN and it's worked fine. When I implemented it with APEX, the call systematically returns 405 Method Not Allowed.  I'm using the right URL and method but it keeps this answer. The site is allowed as a remote site.

Here is some APEX :
 
public static HTTPResponse HttpCall(String endpoint, String protocol, Map<String, String> mapHeaders, String strBody, Integer timeout)
    {
            HttpRequest req = new HttpRequest();
            req.setEndpoint(endpoint);
            req.setMethod(protocol);

        	if(timeout!= null)
                req.setTimeout(timeout); 
            
            if(mapHeaders != null)
                for(String headerkey : mapHeaders.keyset())
                    req.setHeader(headerkey, mapHeaders.get(headerkey));        
            
            if(strBody != null)
                req.setBody(strBody);
            
            system.debug(req);
            Http http = new Http();
            return http.send(req);
    }

    public static void queryBySiren()
    {        
        system.debug('QUERY BY SIREN:');
		String endpoint = 'https://api.insee.fr/entreprises/sirene/V3/siren';
		String protocol = 'GET';
		Map<String, String> headers = new Map<String, String>();
        String body = '';
        Integer timeout = 50000;
        HTTPResponse resp = SireneRequest.HttpCall(endpoint, protocol, headers, body, timeout);
        
        system.assert('OK' == resp.getStatus(), 'Request error : ' + resp.getstatusCode() + ' ' + resp.getStatus());
    }
Because it's working on RESTer and POSTMAN i'am a litle bit confused.

PS : Instead of returning 405 the api should return 401. Obviously i didn't enter credentials for some reasons ;)
Hey,

I developed a lightning component using the "Expandable Section" from SLDS. I achieve to make it open/close thanks to JS controller.

My issue is that I don't have the same animation that happen on a classic record Detail tab. I'm able to do my one animation, but I prefer to use SLDS as much as I can.

Here is my component :
<aura:attribute name="isOpen" type="Boolean" default="true"
                    description="the section is open (true), else (false)"/>
    
    <div class="{!v.isOpen == true ? 'slds-section slds-is-open' : 'slds-section slds-is-close'}">
        <h3 class="slds-section__title">
            <button aria-controls="expando-unique-id" aria-expanded="true" class="slds-button slds-section__title-action"
                    onclick="{!c.handleClick}">
                <span class="slds-truncate" title="Section Title">Section Title</span>
            </button>
        </h3>
        <div aria-hidden="false" class="slds-section__content" id="expando-unique-iddddd">
            <p>Content goes here</p>
        </div>
    </div>
and the controller :
handleClick : function(component, event, helper)
{
	component.set('v.isOpen', !component.get('v.isOpen'));
}

Thanks for your help

The Expandable Section Doc : https://www.lightningdesignsystem.com/components/expandable-section/