• Anatoliy Baranchykov
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hi
I have a problem with canvas app on lightning component. Sometimes my canvas app is blank.

Here is an example of my lightning component :

<aura:component implements="force:appHostable" >
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    <force:canvasApp developerName="MyCanvas" applicationName="MyCanvas"  canvasId="Canvas" aura:id="Cars" border="yes" width="100%" height="600"  scrolling="yes"  namespacePrefix=""/>
</aura:component>

Scenario when not working:

If I open my canvas app from Salesforce Lightning Experience app luncher at first

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

My canvas app is being fully loaded to iframe and i can work with it.

If now i  open again my canvas app again using Salesforce Lightning Experience app luncher

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

At this time my canvas app is blank and in iframe i see only blank tags <title></title><body></body>.
I've checked that I'm connected to my external app and return data by canvas app request.

If now I refresh the page with canvas app I see my external up again.

Can somebody help me, please?

Thanks.
Hi everyone.
Problem with scroll to top in Salesforce1 (Lightning component).

I have the Salesforce1 app with the content which height much more then display area.  If  scroll down to the bottom is this posible put the button "Top" and if user press this button then the content automatically scrolls up?

Thanks.
Hi everyone.
The code from example works only once for me.
I have method where I'm getting data from the salesforce.
public static async Task QuerySalesForceRestApi()
        {
            ForceClient newClient = new ForceClient(instanceUrl, apiVersion, accessToken, new System.Net.Http.HttpClient());
            var contacts2 = await newClient.QueryAsync<Account>("SELECT  Name From Account");
        }

This method works perfect when I'm try to get data at a first time. The same method not working when I'm try to get data after few seconds. I'm getting error System.NullReferenceException in this line.
var contacts2 = await newClient.QueryAsync<Account>("SELECT  Name From Account");
I've checked that newClient is created properly.
Why this code not working twice?
Thanks!

 
Hi
I have a problem with canvas app on lightning component. Sometimes my canvas app is blank.

Here is an example of my lightning component :

<aura:component implements="force:appHostable" >
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    <force:canvasApp developerName="MyCanvas" applicationName="MyCanvas"  canvasId="Canvas" aura:id="Cars" border="yes" width="100%" height="600"  scrolling="yes"  namespacePrefix=""/>
</aura:component>

Scenario when not working:

If I open my canvas app from Salesforce Lightning Experience app luncher at first

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

My canvas app is being fully loaded to iframe and i can work with it.

If now i  open again my canvas app again using Salesforce Lightning Experience app luncher

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

At this time my canvas app is blank and in iframe i see only blank tags <title></title><body></body>.
I've checked that I'm connected to my external app and return data by canvas app request.

If now I refresh the page with canvas app I see my external up again.

Can somebody help me, please?

Thanks.
Hi
I have a problem with canvas app on lightning component. Sometimes my canvas app is blank.

Here is an example of my lightning component :

<aura:component implements="force:appHostable" >
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    <force:canvasApp developerName="MyCanvas" applicationName="MyCanvas"  canvasId="Canvas" aura:id="Cars" border="yes" width="100%" height="600"  scrolling="yes"  namespacePrefix=""/>
</aura:component>

Scenario when not working:

If I open my canvas app from Salesforce Lightning Experience app luncher at first

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

My canvas app is being fully loaded to iframe and i can work with it.

If now i  open again my canvas app again using Salesforce Lightning Experience app luncher

Salesforce Lightning Experience app luncher -> MyApp -> MyCanvasAppTab

At this time my canvas app is blank and in iframe i see only blank tags <title></title><body></body>.
I've checked that I'm connected to my external app and return data by canvas app request.

If now I refresh the page with canvas app I see my external up again.

Can somebody help me, please?

Thanks.