• jojoforce
  • NEWBIE
  • 182 Points
  • Member since 2010

  • Chatter
    Feed
  • 7
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 66
    Questions
  • 47
    Replies
We have a custom object MyObject__c with a date field Pickup_Date__c and it displays correclty on the desktop/browser but in the Salesforce Mobile it is not displaying correctly. See below.
<lightning:recordEditForm aura:id="recordEditForm" objectApiName="MyObject__c" recordId="{!v.recordId}" >

        <lightning:inputField fieldName="Pickup_Date__c" />

	<lightning:button type="submit" />
</lightning:recordEditForm>
 
User-added image
I have a lightning:recordEditForm and inside is a nested lightning:datatable in which inline edit is enabled for some of the fields, for some reason when I click the pencil icon or inline edit for the datatable, it is submitting the form. 

The code snippet looks something like below. 


 
<lightning:recordEditForm>

	<lightning:datatable >

	... code snippet ....

	<lightning:datatable />

	<lightning:button type="submit" />
</lightning:recordEditForm>

 
I have a lightningrecordEditForm and inside is a nested lightning:dataTable, for some reason, when I click the "pencil" icon or inline edit for the lightning:dataTable, it is submitting the form. Any advice? 
I have a lightning quick action that is very simple component and redirects to another custom component using lightning:navingation.

navigateLightning.navigate(pageReference,true)

The replace argument of the navigate method indicates that the new page should replace the current page in the navigation history.

However, as you can see in the screenshot below, the custom component is displayed but the top action bar is also displayed. And they are not clickable nor functional at all. I do not want those top action bar to be visible as they are not part of the custom component. 

Is this a Salesforce Mobile Known Issue?

MyRedirectQuickActionComponent
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >

    <lightning:navigation aura:id="navService" />
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />

    Redirecting...
</aura:component>
({

    doInit : function(component, event, helper) {

        window.setTimeout(
            $A.getCallback(function() {


                component.find("navService").navigate({
                    "type": "standard__component",
                    "attributes": {
                        "componentName": "c__MyRedirectedComponent",
                    },
                    "state": {
                        "c__recordId": component.get('v.recordId')
                    }
                },true);

   
            }), 1
        );
   )
})

MyRedirectedComponent
<aura:component implements="lightning:isUrlAddressable,force:hasRecordId">

    <lightning:navigation aura:id="navService" />
    
    <aura:attribute name="recordId" type="Id"/>

    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:handler name="change" value="{!v.pageReference}" action="{!c.reInit}" />    

    <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_small"
        aria-labelledby="modal-heading-01" aria-modal="true">
        <div class="slds-modal__container">
            <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse">
                <lightning:buttonIcon iconName="utility:close" size="large" class="slds-modal__close" variant="bare-inverse" title="Close" alternativeText="Close modal" onclick="{!c.closeModal}"/>
                <span class="slds-assistive-text">Cancel and close</span>
            </button>
            <div class="slds-modal__header">
                <h1 id="modal-heading-01" class="slds-modal__title slds-hyphenate">Modal header </h1>
            </div>
            <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                <p>Sit nulla est ex deserunt exercitation anim occaecat. Nostrud ullamco deserunt aute id consequat veniam
                    incididunt duis in sint irure nisi. Mollit officia cillum Lorem ullamco minim nostrud elit officia
                    tempor esse quis. Cillum sunt ad dolore quis
                    aute consequat ipsum magna exercitation reprehenderit magna. Tempor cupidatat consequat elit dolor
                    adipisicing.</p>
                <p>Dolor eiusmod sunt ex incididunt cillum quis nostrud velit duis sit officia. Lorem aliqua enim laboris do
                    dolor eiusmod officia. Mollit incididunt nisi consectetur esse laborum eiusmod pariatur proident.
                    Eiusmod et adipisicing culpa deserunt nostrud
                    ad veniam nulla aute est. Labore esse esse cupidatat amet velit id elit consequat minim ullamco mollit
                    enim excepteur ea.</p>
            </div>
            <div class="slds-modal__footer">
                <button class="slds-button slds-button_neutral" aria-label="Cancel and close" onclick="{!c.closeModal}">Cancel</button>
                <button class="slds-button slds-button_brand" onclick="{!c.closeModal}">Save</button>
            </div>
        </div>
    </section>
    <div class="slds-backdrop slds-backdrop_open" role="presentation"></div>

</aura:component>
 
({
    doInit : function(component, event, helper) {
        var pageRef = component.get("v.pageReference");
        if(pageRef && pageRef.state) {
            component.set("v.recordId", pageRef.state.c__recordId);
        }            
    },
    reInit : function(component, event, helper) {
        $A.get('e.force:refreshView').fire();
    },
    closeModal : function(component, event, helper) {

        var navigateLightning = component.find('navService');
        var pageReference = {
            type: 'standard__recordPage',
            attributes: {
                recordId: component.get('v.recordId'),
                objectApiName: 'MyCustomObject__c',
                actionName: 'view'                
            }
            
        };
        event.preventDefault();        
        navigateLightning.navigate(pageReference,true);   
    }
})


User-added image
Does Salesforce Mobile support cookies? I'm trying to set a selected menu item to be persistent so that when I go back to a lightning component, the previously selected menu item is still selected. 

User-added image
I have a lightning component tab, that has a lightning component with lightning:buttonMenu.

However, when I go back to the lightning component tab, I'd like the menu button to retain what was selected sort of cache the last selected menu item and make them sticky.Is there a way to make them sticky? 

For example below... I selected "Menu Item Three". if I go to a different page for example an Account Record Page then I go back to the Lightning Component Tab, I'd like "Menu Item Three" to show that was my last selection.

User-added image

 




 
We have a custom object MyEvent__c with the following datetime fields StartDateTime__c and EndDateTime__c.

I am trying to get all of the current events and upcoming events.
 
For example, today is 9/14/2020   12:23 PM
 
Start Date/TimeEnd Date/TimeResults
9/14/20 1:00 PM9/14/20 2:00 PMInclude
9/14/20 9:00 AM9/14/20 1:00 PMInclude
9/14/20 8:00 AM9/14/20 8:30 AMDo Not Display
9/14/20 1:00 PM9/16/20 7:00 PMInclude
9/14/20 9:00 AM9/16/20 7:00 PMInclude
9/16/20 9:00 AM9/16/20 7:00 PMDo Not Display


Here is my query so far, but its not returning the correct results.
SELECT Id, Name FROM MyEvent__c WHERE StartDate__c = TODAY OR (StartDate__c >=TODAY AND EndDate__c <= TODAY)



 
How do yo navigate to the Calendar tab or to the Event list in Salesforce Mobile? Do we use the force:navigateToComponent? or lightning:navigation?  Any example is greatly appreciated.




How do you navigate to a report that has a URL parameter in salesforce mobile? The following code snippet works in desktop but not in salesforce mobile.
Essentially, I am trying to get to a Report with a URL filter parameter as per the following link (https://help.salesforce.com/articleView?id=reports_filter_url.htm&type=0)
 
var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({
          "url": "/lightning/r/Report/00O0t000000hOKEEA2/view?fv0=John%20Doe"
        });
        urlEvent.fire();

 
I have the following code snippet, and for some reason, when the method returns no data, the lightning component aura framework is throwing an error. In desktop, there's no console error message. But in salesforce mobile, the attched error callback getTasks "undefined is not an object evaluating".The other thing to note, in desktop/web, it is not getting to console.log('loadData : c.getTasks AFTER');



Apex Controller
@AuraEnabled
    public static list<Task> getTasks(String selectedFilter){


        Id currentUserId = userinfo.getUserId();
        set<Id> teamMemberIDs = new set<Id>();

        list<Task> tasks = new list<Task> ();

        teamMemberIDs.add(currentUserId);
        for(User u : [SELECT Id,ManagerId FROM User WHERE ManagerId = :currentUserId]){
            teamMemberIDs.add(u.Id);
        }

        String strQuery = ' SELECT Id, Who.Name, What.Name, AccountId,Account.Name,Subject,Status,Priority,OwnerId,Owner.Name ';
        strQuery += ' FROM Task ';
        strQuery += ' WHERE IsClosed = FALSE ';

        if(selectedFilter == 'TodayTasks'){
            strQuery += ' AND ActivityDate = TODAY ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';

        } else if (selectedFilter == 'AllOverdueTasks') {
            strQuery += ' AND ActivityDate < TODAY ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';
        } else if (selectedFilter == 'TomorrowsTask') {
            strQuery += ' AND ActivityDate = TOMORROW ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';

        } else if (selectedFilter == 'MyTeamsTasks') {            
            strQuery += ' AND ActivityDate = TODAY ';
            strQuery += ' AND  OwnerId IN :teamMemberIDs ';            
        }

        strQuery += ' ORDER BY Subject ASC, What.Name ASC ';
        //strQuery += ' LIMIT 6 ';

        System.debug('JOSEPH DEBUG: getTasks selectedFilter ' + selectedFilter);
        System.debug('JOSEPH DEBUG: getTasks strQuery : ' + strQuery);

        tasks = Database.query(strQuery); 
        return tasks;
    }
Aura Bundle Javascript Controller
({
    callServer : function(component,method,callback,params) {
        var action = component.get(method);
        if (params) {
            action.setParams(params);
        }      
        action.setCallback(this,function(response) {
            var state = response.getState();
            if (state === "SUCCESS") { 
                // pass returned value to callback function
                callback.call(this,response.getReturnValue());   
            } else if (state === "ERROR") {
                // generic error handler
                var errors = response.getError();
                if (errors) {
                    console.log("Errors", errors);
                    if (errors[0] && errors[0].message) {
                        throw new Error("Error" + errors[0].message);
                    }
                } else {
                    throw new Error("Unknown Error");
                }
            }
        });
        $A.enqueueAction(action);
    },
    loadData : function(component) {
        console.log('loadData : ' +  component.get("v.selectedFilter"));
    
        //Get Task Records
        this.callServer(component,"c.getTasks",function(response){
            console.log('loadData : c.getTasks BEFORE');
            component.set("v.tasksCount", response.length);   
            console.log('loadData : v.tasksCount response.length ' + response.length);
            if(response.length > 0){
                component.set("v.isThereTasks",true);
                component.set("v.tasks", response);  
    
            } else {
                component.set("v.isThereTasks",false);
            }
            console.log('loadData : c.getTasks AFTER');

        },{
            selectedFilter: component.get("v.selectedFilter")               
        }); 
    }
    
});
Aura Bundle Component
<aura:attribute name="tasks" type="Task[]"/>

 
Essentially, the task subject or the Account Name should be truncated when its too long but here is what is happening in my component. Any advice on how to use the sdls-truncate css?
 
<table class="slds-table slds-no-row-hover">
                    <tbody>
                        <aura:iteration items="{! v.tasks }" var="task">
                            <tr class="slds-hint-parent">
                                <td class="slds-text-align_left" style="width:30px;">
                                    <lightning:input type="checkbox" label="Checkbox Label" variant="label-hidden"></lightning:input>
                                </td>
                                <td class="slds-text-align_left">
                                    <div class="slds-grid slds-truncate_container_33"  >
                                        <span class="slds-truncate" title="{!task.Subject}">
                                            <a target="_blank" class="slds-text-link" href="" onclick="{! c.handleTaskLink }" data-taskid="{!task.Id}">
                                                {!task.Subject}
                                            </a>            
                                        </span>
                                    </div>
                                </td>
                                <td class="slds-text-align_right">
                                    <div class="slds-grid"  >
                                        <span class="slds-truncate" title="{!task.Account.Name}">
                                            <a target="_blank" class="slds-text-link" href="" onclick="{! c.handleAccountLink }" data-accountid="{!task.AccountId}">
                                                {!task.Account.Name}                                    
                                            </a>    
                                        </span>
                                    </div>
                                </td>
                            </tr>
                        
                        </aura:iteration>
    
                    </tbody>
                </table>

User-added image
I have the following hyperlink and I'm just trying to navigate to the sObject page. However its not redirecting to the record page.
 
<a target="_blank" class="slds-text-link" href=""  onclick="{! c.handleTaskLink }" data-taskid="{!task.Id}">{!task.Subject}</a>


 
handleTaskLink : function (component, event, helper) {

        var recordId = event.getSource().getElement().getAttribute('data-taskid');

        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
          "recordId" : recordId,
          "slideDevName" : "detail"
        });
        navEvt.fire();
    },

 
Can we customize or hide the Page Banner in the Lightning App Page?User-added image
How do you hide the table column header and also now have any border on the lightning:datatable?

Desired Output:
User-added image
Code Snippet
<lightning:datatable class="slds-table slds-table_cell-buffer slds-table_header-hidden"
                        columns="{! v.columns }"
                        data="{! v.data }"
                        keyField="id"
                        onrowaction="{! c.handleRowAction }"
                        hideCheckboxColumn="true"
                        hideTableHeader="true"/>
Result
User-added image
We had a very complex Opportunity data structure with a lot of related objects; and we had a requirement to create a pivot table type of reporting (matrix) but we couldn't do it wit Salesforce Matrix Report so we ended up creating a lightning component that builds a matrix table of data for reporting purposes. 

Typically, users would go to the Reports tab to access a report, but in this situation we created a lightning component to display a complex set of data for reporting purposes. Where would you typically put such lightning component? 
I'm encountering a weird situation in using lightning:tabset, apparently, if the user has not yet navigated (or activated) a tab, the child component in it will be undefined thus any attributes in that component will not be accessible. 


For example... If I have not activated tab2 (meaning, the user did not click tab2 yet) then component.find('tab2') will be undefined. 
 
<lightning:tabset>
 <lightning:tab tab1>
    <c:component_in_tab1 aura:id="tab1" />
 </lightning:tab>

 <lightning:tab tab2>
    <c:component_in_tab2 aura:id="tab2" />     
  </lightning:tab>
</lightning:tabset>


 
var cmp = component.find('tab2');   // THIS THROWS UNDEFINED
var dataAttribute = cmp.get('v.myAttribute');

 
I have a Visualforce Page that is using JavaScript remoting to essentially pass an sObject that has a Date Field into a JavaScript remoting action. However, it appears that it does not seem to recognize the javascript date format. 

 
function MyObject__c(){
    this.Name = null; 
    this.Start_Date__c = null;

}


function createRecord() {
        MyObject__c myobj = new MyObject__c();

        myobj.Start_Date__c  = '2017-01-01'; 

        Visualforce.remoting.Manager.invokeAction(
            '{!$RemoteAction.myclass.mymethod}',
            myobj,
            function(results, event){
                if (event.status) {
                
                	console.log(results);


                }
             }, 
             {escape: true}
         );		
}

I have tried different variation, but it's not working. Any advice would be great.

Variations that I tried...
myobj.Start_Date__c = new date('2017-01-01').toUTCString();

Also this one...
myobj.Start_Date__c = new date('2017-01-01');

And this one...
 
myobj.Start_Date__c = new date('2017-01-01').toISOString();

 
I have a javascript remoting with an sObject that has a date function, however, it doesn't seem like it likes the date. How do I pass an sobject with Date? 

VF Page
function MyObject__c() {
        this.name = null;
	   this.Start_Date__c = null;
	    this.End_Date__c = null;
	    
    } 

function createRecord() {
       MyObject__c myobj = new MyObject__c();

         myobj.Start_Date__c  = '2017-01-01'; 
         myobj.End_Date__c  = '2017-01-31'; 

        Visualforce.remoting.Manager.invokeAction(
            '{!$RemoteAction.myclass.mymethod}',
            myobj,
            function(results, event){
                if (event.status) {
                
                	console.log(results);


                }
             }, 
             {escape: true}
         );		
}
Apex Controller
global class myclass {

   @RemoteAction
   global static void myAction(MyObject__c myobj) {
      insert myobj;
   }

}

I tried different variation in handling javascript date format...Nothing seems to work....Any advice would be great!
 
myobj.Start_Date__c  = new date('2017-01-01'); 
myobj.End_Date__c  = new date('2017-01-31');
myobj.Start_Date__c  = new date('2017-01-01').toUTCString(); 
myobj.End_Date__c  = new date('2017-01-31').toUTCString();



 
We are using a Lightning Out and have a simple Input Box with a Button. The button when clicked, retrieves the value of the input box and inserts it in the MyCustom_Object__c.

When the lightning attribute type is of "MyCustom_Object__c" then the Lightning Out does not work, however, if we use the type "Object" it works. Any ideas?
 
<aura:attribute name="MyRecord" type="MyCustom_Object__c" access="GLOBAL"/>
versus
<aura:attribute name="MyRecord" type="Object" access="GLOBAL"/>



**testComponent.cmp**
<aura:component access="GLOBAL" controller="tempLightningOut" 
        <aura:attribute name="MyRecord" type="MyCustom_Object__c" access="GLOBAL"/>
        <p> Lightning Out Testing </p>
        <lightning:input aura:id="inputNameField" label="Name" name="inputNameField" />
        <lightning:button variant="brand" label="Submit" onclick="{! c.handleClick }" />
    </aura:component>



**testComponent.app**
<aura:application extends="ltng:outApp"  implements="ltng:allowGuestAccess" access="GLOBAL" >
    
            <aura:dependency resource="markup://c:tempComponent" type="COMPONENT"/>
    
        
    </aura:application>



**testComponentController.js**
 
handleClick : function(component, event, helper) {
        
        var cmp = component.find('inputNameField');

        var inputValue= cmp.get("v.value");
        

        helper.callServer(component,"c.insertRecord",function(response){
            var cmp = component.find('inputNameField');
            cmp.set('v.value','');
            
                        
            
        },{
            inputValue: inputValue
        });
        
    }



**testComponentHelper.js**
({
        callServer : function(component,method,callback,params) {
            var action = component.get(method);
            if (params) {
                action.setParams(params);
            }
          
            action.setCallback(this,function(response) {
                var state = response.getState();
                if (state === "SUCCESS") { 
                    // pass returned value to callback function
                    callback.call(this,response.getReturnValue());   
                } else if (state === "ERROR") {
                    // generic error handler
                    var errors = response.getError();
                    if (errors) {
                        console.log("Errors", errors);
                        if (errors[0] && errors[0].message) {
                            throw new Error("Error" + errors[0].message);
                        }
                    } else {
                        throw new Error("Unknown Error");
                    }
                }
            });
    
            $A.enqueueAction(action);
        }
    })


**tempLightningOut Apex Controller**
 
public class tempLightningOut {
             @AuraEnabled    
            public static void insertRecord(String inputValue) {
        
                MyCustom_Object__c rec = new MyCustom_Object__c();
                rec.name = inputValue;
                insert rec ;
            }        
        
     }


HTML
 
<!DOCTYPE html>
<html>
<head>

<script src="https://mydomain.cs62.force.com/lightning/lightning.out.js" type="text/javascript"> </script>

<script type="text/javascript">


    $Lightning.use("c:tempApp",    // name of the Lightning app
        function() {                  // Callback once framework and app loaded
            $Lightning.createComponent(
                "c:tempComponent", // top-level component of your app
                { },                  // attributes to set on the component when created
                "lightningLocator",   // the DOM location to insert the component
                function(cmp) {
                    // callback when component is created and active on the page
                }
            );


        },
        'https://mycommunityendpoint.cs62.force.com/communityendpointtest'  // Community endpoint
    );

</script>
</head>

<body >



		<div id="lightningLocator" style="height:100%;width:100%;"></div>
</body>
</html>


 
In lightning components, what is the difference between .THIS.mycustomclass versus .THIS .mycustomclass?
 
.THIS .mycustomclass {
   //css styling
}


.THIS.mycustomclass {
  //css styling
}



 
I'm encountering a weird situation in using lightning:tabset, apparently, if the user has not yet navigated (or activated) a tab, the child component in it will be undefined thus any attributes in that component will not be accessible. 


For example... If I have not activated tab2 (meaning, the user did not click tab2 yet) then component.find('tab2') will be undefined. 
 
<lightning:tabset>
 <lightning:tab tab1>
    <c:component_in_tab1 aura:id="tab1" />
 </lightning:tab>

 <lightning:tab tab2>
    <c:component_in_tab2 aura:id="tab2" />     
  </lightning:tab>
</lightning:tabset>


 
var cmp = component.find('tab2');   // THIS THROWS UNDEFINED
var dataAttribute = cmp.get('v.myAttribute');

 
Hello, I'm trying to install the Force.com IDE plugin for Eclipse Juno 4.2 on a Windows 8 machine and for some reason I am getting a "could not find repository" error message. For some reason, I think the repository no longer exist because in my old machine where I had Force.com IDE eclipse all my life no longer works either. Any advise or suggestion is greatly appreciated. Thanks

https://developer.salesforce.com/page/Force.com_IDE_Installation

Step #3  "In the Add Repository dialog, set the Name to "Force.com IDE" and the Location to "http://media.developerforce.com/force-ide/eclipse42" and click OK. (Use the same URL for Eclipse 4.3.)"

User-added image

We want to able to share accounts between two orgs. We have turned on Salesforce to Salesforce Sharing between two orgs.

 

Some of the accounts in Org A might already exist in Org B prior to establishing the SF2SF link. The two orgs happen to have a unique External ID as a key identifier of accounts between two orgs. So it we look up an account in one org, we can use the External ID to look it up in the other org.

 

Our issue is that some of the accounts in Org A already exist in Org B prior to establishing the SF2SF link. So we want to be able to establish the link between existing accounts between orgs.

 

Salesforce To Salesforce does not appear to detect duplicate records. If the account already exist in the other org, it generates an error DUPLICATE_VALUE as a system error preventing the record to be shared.

 

Is it possible to update PartnerNetworkRecordConnection object. If we know the ConnectionId, LocalRecordId and the PartnerRecordId, we can theorically just dataload the data. However the field PartnerRecordId does not seem updatable. Or any other workaround?

 

 

We have a custom object MyEvent__c with the following datetime fields StartDateTime__c and EndDateTime__c.

I am trying to get all of the current events and upcoming events.
 
For example, today is 9/14/2020   12:23 PM
 
Start Date/TimeEnd Date/TimeResults
9/14/20 1:00 PM9/14/20 2:00 PMInclude
9/14/20 9:00 AM9/14/20 1:00 PMInclude
9/14/20 8:00 AM9/14/20 8:30 AMDo Not Display
9/14/20 1:00 PM9/16/20 7:00 PMInclude
9/14/20 9:00 AM9/16/20 7:00 PMInclude
9/16/20 9:00 AM9/16/20 7:00 PMDo Not Display


Here is my query so far, but its not returning the correct results.
SELECT Id, Name FROM MyEvent__c WHERE StartDate__c = TODAY OR (StartDate__c >=TODAY AND EndDate__c <= TODAY)



 
How do yo navigate to the Calendar tab or to the Event list in Salesforce Mobile? Do we use the force:navigateToComponent? or lightning:navigation?  Any example is greatly appreciated.
I have the following code snippet, and for some reason, when the method returns no data, the lightning component aura framework is throwing an error. In desktop, there's no console error message. But in salesforce mobile, the attched error callback getTasks "undefined is not an object evaluating".The other thing to note, in desktop/web, it is not getting to console.log('loadData : c.getTasks AFTER');



Apex Controller
@AuraEnabled
    public static list<Task> getTasks(String selectedFilter){


        Id currentUserId = userinfo.getUserId();
        set<Id> teamMemberIDs = new set<Id>();

        list<Task> tasks = new list<Task> ();

        teamMemberIDs.add(currentUserId);
        for(User u : [SELECT Id,ManagerId FROM User WHERE ManagerId = :currentUserId]){
            teamMemberIDs.add(u.Id);
        }

        String strQuery = ' SELECT Id, Who.Name, What.Name, AccountId,Account.Name,Subject,Status,Priority,OwnerId,Owner.Name ';
        strQuery += ' FROM Task ';
        strQuery += ' WHERE IsClosed = FALSE ';

        if(selectedFilter == 'TodayTasks'){
            strQuery += ' AND ActivityDate = TODAY ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';

        } else if (selectedFilter == 'AllOverdueTasks') {
            strQuery += ' AND ActivityDate < TODAY ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';
        } else if (selectedFilter == 'TomorrowsTask') {
            strQuery += ' AND ActivityDate = TOMORROW ';
            strQuery += ' AND OwnerId = \'' + currentUserId + '\'';

        } else if (selectedFilter == 'MyTeamsTasks') {            
            strQuery += ' AND ActivityDate = TODAY ';
            strQuery += ' AND  OwnerId IN :teamMemberIDs ';            
        }

        strQuery += ' ORDER BY Subject ASC, What.Name ASC ';
        //strQuery += ' LIMIT 6 ';

        System.debug('JOSEPH DEBUG: getTasks selectedFilter ' + selectedFilter);
        System.debug('JOSEPH DEBUG: getTasks strQuery : ' + strQuery);

        tasks = Database.query(strQuery); 
        return tasks;
    }
Aura Bundle Javascript Controller
({
    callServer : function(component,method,callback,params) {
        var action = component.get(method);
        if (params) {
            action.setParams(params);
        }      
        action.setCallback(this,function(response) {
            var state = response.getState();
            if (state === "SUCCESS") { 
                // pass returned value to callback function
                callback.call(this,response.getReturnValue());   
            } else if (state === "ERROR") {
                // generic error handler
                var errors = response.getError();
                if (errors) {
                    console.log("Errors", errors);
                    if (errors[0] && errors[0].message) {
                        throw new Error("Error" + errors[0].message);
                    }
                } else {
                    throw new Error("Unknown Error");
                }
            }
        });
        $A.enqueueAction(action);
    },
    loadData : function(component) {
        console.log('loadData : ' +  component.get("v.selectedFilter"));
    
        //Get Task Records
        this.callServer(component,"c.getTasks",function(response){
            console.log('loadData : c.getTasks BEFORE');
            component.set("v.tasksCount", response.length);   
            console.log('loadData : v.tasksCount response.length ' + response.length);
            if(response.length > 0){
                component.set("v.isThereTasks",true);
                component.set("v.tasks", response);  
    
            } else {
                component.set("v.isThereTasks",false);
            }
            console.log('loadData : c.getTasks AFTER');

        },{
            selectedFilter: component.get("v.selectedFilter")               
        }); 
    }
    
});
Aura Bundle Component
<aura:attribute name="tasks" type="Task[]"/>

 
Essentially, the task subject or the Account Name should be truncated when its too long but here is what is happening in my component. Any advice on how to use the sdls-truncate css?
 
<table class="slds-table slds-no-row-hover">
                    <tbody>
                        <aura:iteration items="{! v.tasks }" var="task">
                            <tr class="slds-hint-parent">
                                <td class="slds-text-align_left" style="width:30px;">
                                    <lightning:input type="checkbox" label="Checkbox Label" variant="label-hidden"></lightning:input>
                                </td>
                                <td class="slds-text-align_left">
                                    <div class="slds-grid slds-truncate_container_33"  >
                                        <span class="slds-truncate" title="{!task.Subject}">
                                            <a target="_blank" class="slds-text-link" href="" onclick="{! c.handleTaskLink }" data-taskid="{!task.Id}">
                                                {!task.Subject}
                                            </a>            
                                        </span>
                                    </div>
                                </td>
                                <td class="slds-text-align_right">
                                    <div class="slds-grid"  >
                                        <span class="slds-truncate" title="{!task.Account.Name}">
                                            <a target="_blank" class="slds-text-link" href="" onclick="{! c.handleAccountLink }" data-accountid="{!task.AccountId}">
                                                {!task.Account.Name}                                    
                                            </a>    
                                        </span>
                                    </div>
                                </td>
                            </tr>
                        
                        </aura:iteration>
    
                    </tbody>
                </table>

User-added image
We are using a Lightning Out and have a simple Input Box with a Button. The button when clicked, retrieves the value of the input box and inserts it in the MyCustom_Object__c.

When the lightning attribute type is of "MyCustom_Object__c" then the Lightning Out does not work, however, if we use the type "Object" it works. Any ideas?
 
<aura:attribute name="MyRecord" type="MyCustom_Object__c" access="GLOBAL"/>
versus
<aura:attribute name="MyRecord" type="Object" access="GLOBAL"/>



**testComponent.cmp**
<aura:component access="GLOBAL" controller="tempLightningOut" 
        <aura:attribute name="MyRecord" type="MyCustom_Object__c" access="GLOBAL"/>
        <p> Lightning Out Testing </p>
        <lightning:input aura:id="inputNameField" label="Name" name="inputNameField" />
        <lightning:button variant="brand" label="Submit" onclick="{! c.handleClick }" />
    </aura:component>



**testComponent.app**
<aura:application extends="ltng:outApp"  implements="ltng:allowGuestAccess" access="GLOBAL" >
    
            <aura:dependency resource="markup://c:tempComponent" type="COMPONENT"/>
    
        
    </aura:application>



**testComponentController.js**
 
handleClick : function(component, event, helper) {
        
        var cmp = component.find('inputNameField');

        var inputValue= cmp.get("v.value");
        

        helper.callServer(component,"c.insertRecord",function(response){
            var cmp = component.find('inputNameField');
            cmp.set('v.value','');
            
                        
            
        },{
            inputValue: inputValue
        });
        
    }



**testComponentHelper.js**
({
        callServer : function(component,method,callback,params) {
            var action = component.get(method);
            if (params) {
                action.setParams(params);
            }
          
            action.setCallback(this,function(response) {
                var state = response.getState();
                if (state === "SUCCESS") { 
                    // pass returned value to callback function
                    callback.call(this,response.getReturnValue());   
                } else if (state === "ERROR") {
                    // generic error handler
                    var errors = response.getError();
                    if (errors) {
                        console.log("Errors", errors);
                        if (errors[0] && errors[0].message) {
                            throw new Error("Error" + errors[0].message);
                        }
                    } else {
                        throw new Error("Unknown Error");
                    }
                }
            });
    
            $A.enqueueAction(action);
        }
    })


**tempLightningOut Apex Controller**
 
public class tempLightningOut {
             @AuraEnabled    
            public static void insertRecord(String inputValue) {
        
                MyCustom_Object__c rec = new MyCustom_Object__c();
                rec.name = inputValue;
                insert rec ;
            }        
        
     }


HTML
 
<!DOCTYPE html>
<html>
<head>

<script src="https://mydomain.cs62.force.com/lightning/lightning.out.js" type="text/javascript"> </script>

<script type="text/javascript">


    $Lightning.use("c:tempApp",    // name of the Lightning app
        function() {                  // Callback once framework and app loaded
            $Lightning.createComponent(
                "c:tempComponent", // top-level component of your app
                { },                  // attributes to set on the component when created
                "lightningLocator",   // the DOM location to insert the component
                function(cmp) {
                    // callback when component is created and active on the page
                }
            );


        },
        'https://mycommunityendpoint.cs62.force.com/communityendpointtest'  // Community endpoint
    );

</script>
</head>

<body >



		<div id="lightningLocator" style="height:100%;width:100%;"></div>
</body>
</html>


 
Hi everyone!!

I am trying to used lightning dart on a visualforce as you can see in this link https://lightningdart.com/#/desktop, But i dont know how is this working.
On the link, there is a zip package for download, when i get this fiel there is some .dart fiels but i dont know how to use it.
Has anybody work with it?,Is this an static resource?, if this is an static resource, should I call it like .js scripts? and use sources like it says?.

Thanks
I'm getting an error message saying "No repository found at http://media.developerforce.com/force-ide/eclipse42.".

I'm getting this message when updating OR installing the latest Eclipse Force.com IDE. This makes me believe this is an issue with salesforce or developerforce.com as the community.developerforce.com is also not working.

When doing an update on a machine that had force.com ide eclipse working
User-added image
when doing a fresh install
User-added image
Hello, I'm trying to install the Force.com IDE plugin for Eclipse Juno 4.2 on a Windows 8 machine and for some reason I am getting a "could not find repository" error message. For some reason, I think the repository no longer exist because in my old machine where I had Force.com IDE eclipse all my life no longer works either. Any advise or suggestion is greatly appreciated. Thanks

https://developer.salesforce.com/page/Force.com_IDE_Installation

Step #3  "In the Add Repository dialog, set the Name to "Force.com IDE" and the Location to "http://media.developerforce.com/force-ide/eclipse42" and click OK. (Use the same URL for Eclipse 4.3.)"


error


 
Hi..

I created a simple @Future class in one of our DEV sandboxes, and for some reason it's not executing. It is just staying in queued status.

public with sharing class FutureTesting {

    @future
    public static void calculateInventory() {
   
        System.debug('DO SOMETHING');
    }

}


When I execute this, there is no error message but it just stays in queued status. Anybody have experienced this?

If I create 2 visualforce page VF1 and VF2 using the same Controller "MyController" would the "Total number of executed code statements" limit be contained in its own VF page? meaning, if VF1 calls VF2, then does the Script Execution Statements of VF1 count towards the "Total number of executed code statements" of VF2 as well? or are they counted seperately? 

 

 

Hi - is it possible to export a field that is of type "Long Text Area" into a CSV using the Apex Data Loader? I tried that and it seems like Apex Data Loader is not exporting the field. I know we can't filter on a Long Text Area using the WHERE clause, but is there anywhere in the documentation that says it is possible? Thanks for the help.

 

Hi.....

 

I have a Parent object that have two child objects. Its a lookup type of relationship. A parent record may or may not have a record in Child A nor Child B.

 

So basically, in regular SQL I am trying to achieve something like:

 

SELECT count(id)
FROM Parent
WHERE id in (SELECT parentID from ChildA) 
OR    id in (SELECT parentID from ChildB)

 

However, this does not seem possible in SOQL statements. Is there any work around to this dilemna? I'm trying to get the Parent records if they have child records that exists in either Child A or Child B object. A parent record may have records in Child A, but not have records in Child B (and vice-versa). At the same time, a parent record may have both records in Child A and Child B.

 

Thanks for any ideas or inputs in this matter. It seems pretty easy and I'm sure a lot of people had experienced this issue. 

 

 

 

Re-rendering an apex:actionPoller resets the timer clock to zero. Is that just client side? or is that transaction get sent up to the server?

Here's my query:

        SELECT 
              Id
            , Name
            , UserRole.Name
            , Profile.Name
            ,(  SELECT
                     Id
                    ,CRM_Territory_Type__c
                FROM Territories__r 
                WHERE CRM_Inactive__c=false 
            )
        FROM User
WHERE Territories__r.null
        ORDER BY Name

Is there any way to get this query to ONLY return results where the subquery has results?

 

Thanks!

Hello...

 

The StandardSetController that allows VisualForce pages and Apex to paginate through the records has a "Save" method. According to SalesForce documentation:

 

 

Inserts new records or updates existing records that have been changed. After this operation is finished, it returns aPageReference to the original page, if known, or the home page.

 http://www.salesforce.com/us/developer/docs/pages/Content/apex_pages_standardsetcontroller.htm

 

 

The issue that I am facing right now is everytime I make an update to any of the records and use the save method provided by that query, it always returns me to page 1.

 

For example, if I go to page 3, make an update, and perform a "Save" it always returns to the first page. I thought that it should return to the original page (which is the current page you are on). Am I misunderstanding the documentation? 

Is it possible for 1 action call two seperate action status? 

 

for example,

 

<apex:commandButton id="btnID" status="status1,status2" action="{!someAction}" value="Click Me"/>
 
<apex:actionStatus id="status1">
.....
</apex:actionStatus>

 
<apex:actionStatus id="status2">
.......
</apex:actionStatus>

 
 

 

Hi - 

 

I found this really cool gantt chart, but for some reason I'm having problem embedding it into my Visual Force page. The link of the gantt chart is the following:

 

http://dhtmlx.com/docs/products/dhtmlxGantt/index.shtml

 

I was wondering if anyone can help me figure out what's wrong with the below code? I'm not really getting any error message but the inspect element has "Uncaught TypeError: Cannot call method 'addEventListener' of null". 

 

 

<apex:page >

    <apex:stylesheet value="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxgantt.css')}"/>
    <script type="text/javascript" language="JavaScript" src="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxcommon.js')}"></script>
    <script type="text/javascript" language="JavaScript" src="{!URLFOR($Resource.Timeline, 'codebase/dhtmlxgantt.js')}"></script>


    <head>


    <script language="JavaScript" type="text/javascript">
        function createChartControl(htmlDiv1)
        {
            //project 1
            var project1 = new GanttProjectInfo(1, "Applet 11redesign", new Date(2010, 5, 11));
    
            var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
            parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
            parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
    
            var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
            var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
            var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
            parentTask5.addChildTask(parentTask123);
            parentTask2.addChildTask(parentTask5);
            parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
    
            var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
            var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
            parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
            parentTask4.addChildTask(parentTask8);
            parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
            parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
            parentTask2.addChildTask(parentTask4);
    
            parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
            parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
            parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
            parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
    
            project1.addTask(parentTask1);
            project1.addTask(parentTask2);
    
            //project 2
            var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
    
            var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
            parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
            parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
            project2.addTask(parentTask22);
    
            var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
            parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
            project2.addTask(parentTask70);
    
            var ganttChartControl = new GanttChart();
            ganttChartControl.setImagePath("{!URLFOR($Resource.Timeline, 'codebase/imgs/')}");
            
            ganttChartControl.setEditable(true);
            
            ganttChartControl.addProject(project1);
            
            ganttChartControl.create(htmlDiv1);
        }
    </script>
    
    <style>
        body {font-size:12px}
        .{font-family:arial;font-size:12px}
        h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
        xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
        .hdr{
            background-color:lightgrey;
            margin-bottom:10px;
            padding-left:10px;
        }
    </style>

    </head>

    <body onload="createChartControl('GanttDiv');">
        <div style="width:950px;height:620px;position:absolute;" id="GanttDiv"></div>
    </body>



</apex:page>