• Raya Banerjee 3
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Anyone has implemented  Semafone integration with salesforce for the secure payment process? We are trying to set up salesforce call center along with Semafne. Can anyone help with the process of implementation?
We are facing issue on de-duplication on object records in lightning javascript.

I have tried IndexOf() and de-dup based on ID.

This is my use case in detail:

I have a search bar where user can select multiple records from search result which will added to a data table list to show the selected rows. The user can omit the search string,so the search result will be shown based on the new search string.

Issue is
The selected Row even on data-table only returns selected rows particularly for the specific search, does not hold the previously selected items.
To resolve this I have introduced an attribute which will hold previously selected items

But the final list is having duplicate records if the user selects a new item from search string bus does not deselect the previously added ones.
Not able to remove duplicate records from the final list when I merge previously selected and currently selected list.

Here is the snippet:

updateSelected: function (component, event, helper) {
        var selectedRows =event.getParam('selectedRows');
        var previousData = component.get("v.previousData");
        var allRecs = [];
        var allRecID = [] ;
        var uniqueArray = [];
        var totalQuantity = 0;
      
        if(previousData.length > 0){
            try{
                for ( var j = 0; j < previousData.length; j++ ) {
                     allRecs.push(previousData[j]);
                }
                for(var j=0; j< selectedRows.length; j++){
                     allRecs.push(selectedRows[j]); 
                }
                for(var i = 0; i < allRecs.length ; i++){
                  alert('==allRecs[i]===='+allRecs[i]);
                  if(uniqueArray.indexOf(allRecs[i]) === -1){   //Not working
                      uniqueArray.push(allRecs[i]); 
                  }
                }
            }
            catch(err) {
              alert('error=='+err.message +'===='+err.lineNumber);
            }
          
        }
        else{
            for(var i=0; i < selectedRows.length; i++){
                                                uniqueArray.push(selectedRows[i]);
                alert('==1st time'+selectedRows[i]);
            }
        }
       
        for ( var i = 0; i < uniqueArray.length; i++ ) {
            totalQuantity =  uniqueArray[i].Quantity +totalQuantity;
        }
        component.set('v.previousData', uniqueArray);
        component.set('v.selectedRow', uniqueArray);
        component.set('v.rowSelected', uniqueArray.length);
        component.set('v.totalQuantity', totalQuantity);
      
        if(uniqueArray.length !=0){
            component.set("v.hideFinalSection",true);
        }
       
    },

I have also tried to de-duplicate based on ID  with below logic which is not adding the correct records also.

                for ( var j = 0; j < previousData.length; j++ ) {
                    for(var i=0; i< selectedRows.length; i++){
                        if(selectedRows[i].Id != previousData[j].Id){
                            uniqueArray.push(selectedRows[i]);
                        }
                    }
                }
It will be great if anyone has any input.
 
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3016F000000U8PF. Flow error messages: An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: []

please suggest. 

 

Hi Friends ,

I am trying to migrate Apex code from sandbox to production but I am getting the follwing message

 

This organization isn't authorized to upload change sets to other organizations. For authorization, contact the deployment connections administrators on the organizations where you want to upload changes.
 
I have system admin access.So can somebody tell what changes and where I have to make in production so that I can migrate code to the production.Quick response will be highly appreciated.
 
Thanks,

Trick009

 

 

 

 

  • October 07, 2011
  • Like
  • 0