• Clemens Mittl
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hello  everyone,
i am recently working on some features using the Lightning Data Service and i am facing a somewhat strange condition.
 
Component A is working fine as intended:
Via the LDS recordData component it fetches data, runs logic on it in the recordUpdated function and renders some markup for presentation of the data.
The User is provided with the oppportunity to interact with the data and upon a button click some changed data is send back to the server via the recordData save function.
 
 
Component B holds some more markup and is utilizing another child component, an ApexController and Custom Event (for communication between child Component C and parent Component B) for it´s main logic and presentation.
 
The LightningDataService part via recordData however is implemented exactly the same as in Component A to fetch some data in the recordUpdated function and save data back once processing in the custom component is done.
 
For some reason it seems that in Component B the recordUpdated function in the controller is never executed and i therefore cannot work with the fetched data. I checked multiple times and the LDS part is setup in the exact same manner as in Component A - which is working.
 
 
Both Component A & B are placed on the Account Record.
 
 
recordData snippet from Component B
    <aura:attribute name="recordId" type="String" />
    <aura:attribute name="record" type="Object"/>
    <aura:attribute name="simpleRecord" type="Object"/>
    <aura:attribute name="recordError" type="String"/>
 
   <force:recordData aura:id="recordHandler" recordId="{!v.recordId}"
          targetRecord ="{!v.record}"
          targetFields ="{!v.simpleRecord}"
          fields="backendtextfield__c"
          recordUpdated="{!c.recordUpdated}"
          mode="EDIT"/>
 
 
recordUpdated snippet from Controller B
 
recordUpdated: function(component, event, helper) {
        console.log("record Updated function is reached");
              var eventParams = event.getParams();
        if(eventParams.changeType === "LOADED" || eventParams.changeType === "CHANGED") {
           // record is loaded or changed (render other component which needs record data value)
            console.log("Record loaded");
                      
          // this is where some logic will be placed


        } else if(eventParams.changeType === "REMOVED") {
            // record is deleted
        } else if(eventParams.changeType === "ERROR") {
            // there’s an error while loading, saving, or deleting the record
           
        }
    }
 
 
Do i miss some incompatibilities of LDS with other Lightning building blocks?
 
 
Thanks for any ideas and directions,
Clemens

Hello Salesforce Developers,
is anyone of you actively using Salesforce Canvas in Lightning in 2018?

We are trying to embed some internal hosted Web Applications into our Salesforce Instance, using canvas.

At first the reuqest got rejected and in order to find out if that was due to the authentification header from Salesforce Canvas i implemented the external Web App also as a Web Tab in our Salesforce Instance.

It turned out that the issue was due to the 'sameorigin' settings on the side of our Web App preventing it to be loaded in an iframe.

Strangely after experimenting with the configs:

The Web Tab in Salesforce now successfully shows to our Web Application, while in Salesforce Canvas we still see the following error:

"in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' *.salesforce.com"."

Therefore i wonder if anyone know how "Web Tab" and "Canvas" Integrations in Salesforce differ in their implementations so that we can get some more ideas what we could try in order to make this Canvas Integration work - for now i don´t want to fall back to custom links opening in a new tab as the embeded nature will help us in creating a "seamless" flow for the users.


It gets even more complicated:

While the Web Tab is loading successfully in Salesforce Classic, the same is not true for Lightning Experience (Same error as in the canvas integration)

Thanks a lot for any hints you can share.

Best regards,
Clemens

Hello  everyone,
i am recently working on some features using the Lightning Data Service and i am facing a somewhat strange condition.
 
Component A is working fine as intended:
Via the LDS recordData component it fetches data, runs logic on it in the recordUpdated function and renders some markup for presentation of the data.
The User is provided with the oppportunity to interact with the data and upon a button click some changed data is send back to the server via the recordData save function.
 
 
Component B holds some more markup and is utilizing another child component, an ApexController and Custom Event (for communication between child Component C and parent Component B) for it´s main logic and presentation.
 
The LightningDataService part via recordData however is implemented exactly the same as in Component A to fetch some data in the recordUpdated function and save data back once processing in the custom component is done.
 
For some reason it seems that in Component B the recordUpdated function in the controller is never executed and i therefore cannot work with the fetched data. I checked multiple times and the LDS part is setup in the exact same manner as in Component A - which is working.
 
 
Both Component A & B are placed on the Account Record.
 
 
recordData snippet from Component B
    <aura:attribute name="recordId" type="String" />
    <aura:attribute name="record" type="Object"/>
    <aura:attribute name="simpleRecord" type="Object"/>
    <aura:attribute name="recordError" type="String"/>
 
   <force:recordData aura:id="recordHandler" recordId="{!v.recordId}"
          targetRecord ="{!v.record}"
          targetFields ="{!v.simpleRecord}"
          fields="backendtextfield__c"
          recordUpdated="{!c.recordUpdated}"
          mode="EDIT"/>
 
 
recordUpdated snippet from Controller B
 
recordUpdated: function(component, event, helper) {
        console.log("record Updated function is reached");
              var eventParams = event.getParams();
        if(eventParams.changeType === "LOADED" || eventParams.changeType === "CHANGED") {
           // record is loaded or changed (render other component which needs record data value)
            console.log("Record loaded");
                      
          // this is where some logic will be placed


        } else if(eventParams.changeType === "REMOVED") {
            // record is deleted
        } else if(eventParams.changeType === "ERROR") {
            // there’s an error while loading, saving, or deleting the record
           
        }
    }
 
 
Do i miss some incompatibilities of LDS with other Lightning building blocks?
 
 
Thanks for any ideas and directions,
Clemens
Hi guys, is there a global search in Lightning similar to Classic that use &startURL=/_ui/search/ui/UnifiedSearchResults?str=valueToSearch ?.
If you know something please let me know. Thank you.

-Austin
Please can you guide us how to integrate salesforce to Apache Kafka.