-
ChatterFeed
-
7Best Answers
-
4Likes Received
-
0Likes Given
-
66Questions
-
47Replies
lightning:inputField of type Date is not displaying correctly in Salesforce Mobile
<lightning:recordEditForm aura:id="recordEditForm" objectApiName="MyObject__c" recordId="{!v.recordId}" > <lightning:inputField fieldName="Pickup_Date__c" /> <lightning:button type="submit" /> </lightning:recordEditForm>
- jojoforce
- May 10, 2022
- Like
- 0
- Continue reading or reply
Inline Edit with lightning:datatable is submitting the form on edit
The code snippet looks something like below.
<lightning:recordEditForm> <lightning:datatable > ... code snippet .... <lightning:datatable /> <lightning:button type="submit" /> </lightning:recordEditForm>
- jojoforce
- May 05, 2022
- Like
- 0
- Continue reading or reply
Inline Edit with lightning:dataTable is submitting the lightning:recordEditForm
- jojoforce
- May 05, 2022
- Like
- 0
- Continue reading or reply
How to use lightning:navigation navigate(pageReference,true) in Salesforce Mobile App?
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); } })
- jojoforce
- April 28, 2022
- Like
- 0
- Continue reading or reply
Cookies with Salesforce Mobile?
- jojoforce
- September 23, 2020
- Like
- 0
- Continue reading or reply
Sticky and persistent menu selection in lightning component
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.
- jojoforce
- September 23, 2020
- Like
- 0
- Continue reading or reply
How to SOQL Query that has startdate and enddate
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/Time | End Date/Time | Results |
9/14/20 1:00 PM | 9/14/20 2:00 PM | Include |
9/14/20 9:00 AM | 9/14/20 1:00 PM | Include |
9/14/20 8:00 AM | 9/14/20 8:30 AM | Do Not Display |
9/14/20 1:00 PM | 9/16/20 7:00 PM | Include |
9/14/20 9:00 AM | 9/16/20 7:00 PM | Include |
9/16/20 9:00 AM | 9/16/20 7:00 PM | Do 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)
- jojoforce
- September 16, 2020
- Like
- 0
- Continue reading or reply
Navigate to Calendar tab or Event in Salesforce Mobile
- jojoforce
- September 14, 2020
- Like
- 0
- Continue reading or reply
navigate to a report with url parameter
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();
- jojoforce
- September 09, 2020
- Like
- 0
- Continue reading or reply
retrieving data issue
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[]"/>
- jojoforce
- September 08, 2020
- Like
- 0
- Continue reading or reply
How to slds-truncate within an HTML Table
<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>
- jojoforce
- September 05, 2020
- Like
- 0
- Continue reading or reply
a href hyperlink to navigate to SObject in lightning component
<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(); },
- jojoforce
- September 04, 2020
- Like
- 0
- Continue reading or reply
can we customize or hide the Page Banner in the Lightning App Page?
- jojoforce
- September 02, 2020
- Like
- 0
- Continue reading or reply
Hide the column header and row borders/line for lightning:datatable
Desired Output:
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
- jojoforce
- August 27, 2020
- Like
- 0
- Continue reading or reply
Custom Lightning Components that displays 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?
- jojoforce
- October 31, 2018
- Like
- 0
- Continue reading or reply
lightning:tabset child components within a tab is undefined until tab is activated
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');
- jojoforce
- June 15, 2018
- Like
- 1
- Continue reading or reply
How to pass an sObject that has a Date field in JavaScript Remoting?
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();
- jojoforce
- October 25, 2017
- Like
- 0
- Continue reading or reply
javascript remoting 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();
- jojoforce
- October 24, 2017
- Like
- 0
- Continue reading or reply
<attribute type=MyCustom_Object__c /> in Lightning Out is not working
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>
- jojoforce
- May 12, 2017
- Like
- 0
- Continue reading or reply
Difference between .THIS.mycustomclass versus .THIS .mycustomclass?
.THIS .mycustomclass { //css styling } .THIS.mycustomclass { //css styling }
- jojoforce
- April 06, 2017
- Like
- 0
- Continue reading or reply
lightning:tabset child components within a tab is undefined until tab is activated
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');
- jojoforce
- June 15, 2018
- Like
- 1
- Continue reading or reply
Unable to install Force.com IDE plugin for Eclipse Juno 4.2
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.)"
- jojoforce
- November 25, 2014
- Like
- 2
- Continue reading or reply
Salesforce To Salesforce Sharing Prevent Duplicates/Establish link between pre-existing Accounts
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?
- jojoforce
- October 23, 2013
- Like
- 1
- Continue reading or reply
How to SOQL Query that has startdate and enddate
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/Time | End Date/Time | Results |
9/14/20 1:00 PM | 9/14/20 2:00 PM | Include |
9/14/20 9:00 AM | 9/14/20 1:00 PM | Include |
9/14/20 8:00 AM | 9/14/20 8:30 AM | Do Not Display |
9/14/20 1:00 PM | 9/16/20 7:00 PM | Include |
9/14/20 9:00 AM | 9/16/20 7:00 PM | Include |
9/16/20 9:00 AM | 9/16/20 7:00 PM | Do 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)
- jojoforce
- September 16, 2020
- Like
- 0
- Continue reading or reply
Navigate to Calendar tab or Event in Salesforce Mobile
- jojoforce
- September 14, 2020
- Like
- 0
- Continue reading or reply
retrieving data issue
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[]"/>
- jojoforce
- September 08, 2020
- Like
- 0
- Continue reading or reply
How to slds-truncate within an HTML Table
<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>
- jojoforce
- September 05, 2020
- Like
- 0
- Continue reading or reply
<attribute type=MyCustom_Object__c /> in Lightning Out is not working
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>
- jojoforce
- May 12, 2017
- Like
- 0
- Continue reading or reply
Has anybody use Google dart on lightning visualforce develop?
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
- Joseph Wrian Ceron Iriarte
- August 02, 2016
- Like
- 0
- Continue reading or reply
developerforce.com repository site down for eclipse juno 4.2?
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
when doing a fresh install
- jojoforce
- November 26, 2014
- Like
- 0
- Continue reading or reply
Unable to install Force.com IDE plugin for Eclipse Juno 4.2
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.)"
- jojoforce
- November 25, 2014
- Like
- 0
- Continue reading or reply
@future stays in queued
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?
- jojoforce
- April 08, 2014
- Like
- 0
- Continue reading or reply
Same Controller to Pass Data between Multiple VisualForce Page - Governor Limit
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?
- jojoforce
- April 10, 2013
- Like
- 0
- Continue reading or reply
Export Long Text Area using DataLoader?
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.
- jojoforce
- July 10, 2012
- Like
- 0
- Continue reading or reply
SOQL simple outer join? Multiple Semi-Join
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.
- jojoforce
- June 21, 2012
- Like
- 0
- Continue reading or reply
AJAX rerender an apex:actionPoller Question
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?
- jojoforce
- May 03, 2012
- Like
- 0
- Continue reading or reply
SOQL - Only return objects where subquery has results?
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!
- loneboat
- April 27, 2012
- Like
- 0
- Continue reading or reply
StandardSetController SAVE returns to 1st page
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?
- jojoforce
- March 27, 2012
- Like
- 0
- Continue reading or reply
AJAX Multiple actionStatus calling two different apex:actionStatus
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>
- jojoforce
- March 20, 2012
- Like
- 0
- Continue reading or reply
Visual Force Page - Java Script Gantt Chart
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>
- jojoforce
- August 18, 2011
- Like
- 0
- Continue reading or reply