-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
9Questions
-
9Replies
Unable to upload the LDS 2.10.0 as static resource
As we know that static resource has a limit of 5MB, I am trying to upload the LDS winter 20 release as static resource, but it is more than 5 MB
Error: static resource cannot exceed 5MB
https://lightningdesignsystem.com/downloads/
The one named as ''Download Lightning Design System (Static Resource) (2.10.0)
In this link I downloaded the one which needs to be used as static resource Lightning Design System Static Resource, the size is coming more than 5MB.
Any idea how do I upload that ?
Error: static resource cannot exceed 5MB
https://lightningdesignsystem.com/downloads/
The one named as ''Download Lightning Design System (Static Resource) (2.10.0)
In this link I downloaded the one which needs to be used as static resource Lightning Design System Static Resource, the size is coming more than 5MB.
Any idea how do I upload that ?
- Quddus Ololade 4
- September 25, 2019
- Like
- 0
- Continue reading or reply
How to get rid of URLname field from Knowledge Article Object. ?
Hi ,
I know that urlname cant be removed from the layout nor can be made non mandatory. Hence I want to know is their any way to tweak that feature?
The problem is that the urlname has to be unique which autopopulates based on the Article Title . In our case sometimes the article name is name but the version and the summary is different , then in that case it becomes difficult to save the record as urlname is unique , in such cases the sales user puts random values like _1 or 001 as junk values to get that record saved.
Hence I wanted to know if we can have some solution to avoid these junk values in salesforce.
Any help appreciated !
I know that urlname cant be removed from the layout nor can be made non mandatory. Hence I want to know is their any way to tweak that feature?
The problem is that the urlname has to be unique which autopopulates based on the Article Title . In our case sometimes the article name is name but the version and the summary is different , then in that case it becomes difficult to save the record as urlname is unique , in such cases the sales user puts random values like _1 or 001 as junk values to get that record saved.
Hence I wanted to know if we can have some solution to avoid these junk values in salesforce.
Any help appreciated !
- Quddus Ololade 4
- October 30, 2018
- Like
- 0
- Continue reading or reply
Test Class Cover for Constant Class in Salesforce
Below is the sample code :
I tried with assert and defining a constructor as well but it didnt work. The first line which is an integer is getting covered though but not the other lines
Test Class:
Any help appreciated.
public class ApexConstantsCls { public static final INTEGER DEFAULT_SIZE= 3; public static final STRING INITIAL_SUBMIT= 'Draft'; public static final STRING ERROR_MESSAGE = 'An error has occurred, please contact Admin.'; }
I tried with assert and defining a constructor as well but it didnt work. The first line which is an integer is getting covered though but not the other lines
Test Class:
@istest public class testtt { static TestMethod void Product2Extension_UnitTest1(){ Test.startTest(); System.assertEquals(ApexConstantsCls.INITIAL_SUBMIT,'Draft'); test.stopTest(); } }
Any help appreciated.
- Quddus Ololade 4
- August 22, 2018
- Like
- 0
- Continue reading or reply
How to reload standard detail lightning page after clicking on a custom button
I am using a custom button having VF behaviour on contail detail page
The action logrecord is a page reference method return type which navigates to an internal URL.
Once I click the custom button (VF page), How can I refresh the standard contact lightning detail page? I tried with window object and DOM element as well but no luck.
Any suggestions?
<apex:page standardController="Contact" extensions="ContactController" action="{!logrecord}" showHeader="false" sidebar="false"> <script type = "text/javascript"> alert(document.location.href); } </script> </apex:page>
The action logrecord is a page reference method return type which navigates to an internal URL.
Once I click the custom button (VF page), How can I refresh the standard contact lightning detail page? I tried with window object and DOM element as well but no luck.
Any suggestions?
- Quddus Ololade 4
- June 06, 2018
- Like
- 0
- Continue reading or reply
Unable to get the deserialized object to lightning controller
Component:
In apex debug log, I see that the JSON object has been successfully parsed, while in a lightning controller, I don't get the value in response.getreturnvalue() for this apex method (JsonGetValue) also nothing in the console.log
I saw in a couple of blogs that we can pass an object from APEX and refer it in lightning controller and component
Can someone help me understand why I am not getting the object in the lightning controller console log
<aura:component controller="LightningController" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" > <aura:attribute name="purposes" type="ApexDataContainer" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> data: {!v.purposes} </aura:component>Controller
({ doInit : function(component, event, helper) { var getdata = component.get("c.JsonGetValue"); getdata.setCallback(this, function(response){ var state = response.getState(); if (state === 'SUCCESS'){ var result = response.getReturnValue(); console.log('1'+JSON.stringify(result)); console.log('2'+result['purposes']); component.set("v.purposes",response.getReturnValue()); } }); $A.enqueueAction(getdata); } })Apex:
public class LightningController { @AuraEnabled public static ApexDataContainer JsonGetValue() { ApexDataContainer c1 = new ApexDataContainer(); System.debug('hello'); String json1= '{'+ ''+ ' "purposes": ['+ ''+ ' {'+ ''+ ' "purpose": "service-improvement",'+ ''+ ' "legalGround": "ic",'+ ''+ ' "status": "not_answered",'+ ''+ ' "description": ['+ ''+ ' {'+ ''+ ' "language": "sv-EN",'+ ''+ ' "text": "Service data structure"'+ ''+ ' }'+ ''+ ' ],'+ ''+ ' "version": "1.0.0",'+ ''+ ' "dataIds": []'+ ''+ ' }'+ ' ]'+ ''+ '}'; c1 = (ApexDataContainer)JSON.deserialize(json1,ApexDataContainer.class); system.debug('wrapper'+c1.purposes.size()); return c1; } }
In apex debug log, I see that the JSON object has been successfully parsed, while in a lightning controller, I don't get the value in response.getreturnvalue() for this apex method (JsonGetValue) also nothing in the console.log
I saw in a couple of blogs that we can pass an object from APEX and refer it in lightning controller and component
Can someone help me understand why I am not getting the object in the lightning controller console log
- Quddus Ololade 4
- March 30, 2018
- Like
- 0
- Continue reading or reply
Unable to get the value in force:outputfield on pageload
My component code: My component code: My component code: <aura:component controller="AccountController" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" > <ltng:require styles="/resource/slds221/assets/styles/salesforce-lightning-design-system.min.css" /> <aura:attribute name="edit" type="Boolean" default="true"/> <aura:attribute name="save" type="Boolean" default="false"/> <aura:attribute name="cancel" type="Boolean" default="false"/> <aura:attribute name="Account" type="Account" default="{ 'sobjectType': 'Account' }"/> <aura:attribute name="recordId" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <center> <aura:if isTrue="{!v.edit}"> <lightning:button variant="neutral" label="Edit Info" class="slds-align_absolute-center" onclick="{!c.handleEdit}"/> </aura:if> <aura:if isTrue="{!v.save}"> <lightning:button variant="neutral" label="Save Info" class="slds-align_absolute-center" onclick="{!c.handleSave}"/> </aura:if> <aura:if isTrue="{!v.cancel}"> <lightning:button variant="neutral" label="Cancel" class="slds-align_absolute-center" onclick="{!c.handleCancel}"/> </aura:if> </center> <div class="slds-form slds-form_stacked"> <div class="slds-form-element"> <div class="slds-form-element__control"> <lightning:select name="selectItem" label="Process Item" disabled="{!!v.save}"> <option value="1">Yes</option> <option value="2">No</option> </lightning:select> </div> <label class="slds-form-element__label" for="input-id-03">Process Contact ?</label> Save: {!v.Account.Contact__c} <aura:renderIf isTrue="{!v.save}"> <div class="slds-form-element__control"> <force:inputField value="{!v.Account.Contact__c}" class="foo" >{!v.Account.Contact__c}</force:inputField> </div> </aura:renderIf> <aura:renderIf isTrue="{!!v.save}"> <div class="slds-form-element__control"> <force:outputField aura:id="accountLookupOutput" value="{!v.Account.Contact__c}"/> </div> </aura:renderIf> </div> </div> </aura:component>My Js:
({ doInit : function(component, event, helper) { var getaccountdata = component.get("c.getAccount"); getaccountdata.setParams({ "Id": component.get("v.recordId")}); getaccountdata.setCallback(this, function(response){ var state = response.getState(); if (state === 'SUCCESS'){ console.log(response.getReturnValue()); component.set("v.Account",response.getReturnValue()); } }); $A.enqueueAction(getaccountdata); }
I get the associated account data for that account and then I set it back to the account variable attribute.
But on page load, I dont see the value in force:outputfield even though that account has that value populated in the field. Its the standard field so ideally it should have shown the value which is already in the account with the standard view .
Can anyone help me on this? if I missed something here
I also tried to put force:output field at the top as well but still the same its blank on page load
- Quddus Ololade 4
- March 25, 2018
- Like
- 0
- Continue reading or reply
Unable to use my wrapper class in Lightning component API version 42
Below Code:
Component Code:
This is speacially on the lightning component API 42 version, I have old component which is on 40 API version works absolutely fine.
Is this is a bug or not the right way to use wrapper any more in lightning ?
Any ideas appreciated !
Thanks
public class parentclass{ public class Model{ @AuraEnabled public String year {get;set;} @AuraEnabled public Map<Integer, Decimal> dataMap {get;set;} } }
Component Code:
<aura:component controller="parentclass" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global"> <aura:attribute name="listVehicles" type="parentclass.Model[]" />Error: while saving the component: Failed to save undefined: Invalid <aura:attribute> type: Model
This is speacially on the lightning component API 42 version, I have old component which is on 40 API version works absolutely fine.
Is this is a bug or not the right way to use wrapper any more in lightning ?
Any ideas appreciated !
Thanks
- Quddus Ololade 4
- February 28, 2018
- Like
- 0
- Continue reading or reply
Dashboard or Tabular report in Lightning Home Page
Hi ,
I have a tabular report created in salesforce, I want to add the same in Lightning Home page, but I see we have only two option One is report chart or another is Dashboard.
Report chart I cant use as I dont have chart in my report
Dashboard I tried to use but even if I place my tabular report in dashboard still that didn't load up in home page components. I see only the heading of the dashboard over there.
Is their any way to display my tabular report in Home page and secondly Why my dashboard doesnot load up in home page. ANy help will be appreciated .
Thanks !
I have a tabular report created in salesforce, I want to add the same in Lightning Home page, but I see we have only two option One is report chart or another is Dashboard.
Report chart I cant use as I dont have chart in my report
Dashboard I tried to use but even if I place my tabular report in dashboard still that didn't load up in home page components. I see only the heading of the dashboard over there.
Is their any way to display my tabular report in Home page and secondly Why my dashboard doesnot load up in home page. ANy help will be appreciated .
Thanks !
- Quddus Ololade 4
- February 21, 2018
- Like
- 0
- Continue reading or reply
Is their any way to get all the filter criterias being used in salesforce reports?
I need a list of all reports along with the filter conditions being used the reports. I have searched lot of ideas and blogs but didn't find any proper solution to that.
The closest I went is with eclipse Force.com IDE but even with that i cant get everything. I have to write the folder name and then report name which is a lot of manual effort
Thanks for your help !
The closest I went is with eclipse Force.com IDE but even with that i cant get everything. I have to write the folder name and then report name which is a lot of manual effort
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>SF_Team/ReportDemoType</members> <name>Report</name> </types> <version>38.0</version> </Package>In our org we have 3K reports altogether. Do we have any tool or app exchange product through which I can get all report filters being used in report.
Thanks for your help !
- Quddus Ololade 4
- February 02, 2018
- Like
- 0
- Continue reading or reply
How to reload standard detail lightning page after clicking on a custom button
I am using a custom button having VF behaviour on contail detail page
The action logrecord is a page reference method return type which navigates to an internal URL.
Once I click the custom button (VF page), How can I refresh the standard contact lightning detail page? I tried with window object and DOM element as well but no luck.
Any suggestions?
<apex:page standardController="Contact" extensions="ContactController" action="{!logrecord}" showHeader="false" sidebar="false"> <script type = "text/javascript"> alert(document.location.href); } </script> </apex:page>
The action logrecord is a page reference method return type which navigates to an internal URL.
Once I click the custom button (VF page), How can I refresh the standard contact lightning detail page? I tried with window object and DOM element as well but no luck.
Any suggestions?
- Quddus Ololade 4
- June 06, 2018
- Like
- 0
- Continue reading or reply
Unable to get the deserialized object to lightning controller
Component:
In apex debug log, I see that the JSON object has been successfully parsed, while in a lightning controller, I don't get the value in response.getreturnvalue() for this apex method (JsonGetValue) also nothing in the console.log
I saw in a couple of blogs that we can pass an object from APEX and refer it in lightning controller and component
Can someone help me understand why I am not getting the object in the lightning controller console log
<aura:component controller="LightningController" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" > <aura:attribute name="purposes" type="ApexDataContainer" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> data: {!v.purposes} </aura:component>Controller
({ doInit : function(component, event, helper) { var getdata = component.get("c.JsonGetValue"); getdata.setCallback(this, function(response){ var state = response.getState(); if (state === 'SUCCESS'){ var result = response.getReturnValue(); console.log('1'+JSON.stringify(result)); console.log('2'+result['purposes']); component.set("v.purposes",response.getReturnValue()); } }); $A.enqueueAction(getdata); } })Apex:
public class LightningController { @AuraEnabled public static ApexDataContainer JsonGetValue() { ApexDataContainer c1 = new ApexDataContainer(); System.debug('hello'); String json1= '{'+ ''+ ' "purposes": ['+ ''+ ' {'+ ''+ ' "purpose": "service-improvement",'+ ''+ ' "legalGround": "ic",'+ ''+ ' "status": "not_answered",'+ ''+ ' "description": ['+ ''+ ' {'+ ''+ ' "language": "sv-EN",'+ ''+ ' "text": "Service data structure"'+ ''+ ' }'+ ''+ ' ],'+ ''+ ' "version": "1.0.0",'+ ''+ ' "dataIds": []'+ ''+ ' }'+ ' ]'+ ''+ '}'; c1 = (ApexDataContainer)JSON.deserialize(json1,ApexDataContainer.class); system.debug('wrapper'+c1.purposes.size()); return c1; } }
In apex debug log, I see that the JSON object has been successfully parsed, while in a lightning controller, I don't get the value in response.getreturnvalue() for this apex method (JsonGetValue) also nothing in the console.log
I saw in a couple of blogs that we can pass an object from APEX and refer it in lightning controller and component
Can someone help me understand why I am not getting the object in the lightning controller console log
- Quddus Ololade 4
- March 30, 2018
- Like
- 0
- Continue reading or reply
Unable to get the value in force:outputfield on pageload
My component code: My component code: My component code: <aura:component controller="AccountController" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global" > <ltng:require styles="/resource/slds221/assets/styles/salesforce-lightning-design-system.min.css" /> <aura:attribute name="edit" type="Boolean" default="true"/> <aura:attribute name="save" type="Boolean" default="false"/> <aura:attribute name="cancel" type="Boolean" default="false"/> <aura:attribute name="Account" type="Account" default="{ 'sobjectType': 'Account' }"/> <aura:attribute name="recordId" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <center> <aura:if isTrue="{!v.edit}"> <lightning:button variant="neutral" label="Edit Info" class="slds-align_absolute-center" onclick="{!c.handleEdit}"/> </aura:if> <aura:if isTrue="{!v.save}"> <lightning:button variant="neutral" label="Save Info" class="slds-align_absolute-center" onclick="{!c.handleSave}"/> </aura:if> <aura:if isTrue="{!v.cancel}"> <lightning:button variant="neutral" label="Cancel" class="slds-align_absolute-center" onclick="{!c.handleCancel}"/> </aura:if> </center> <div class="slds-form slds-form_stacked"> <div class="slds-form-element"> <div class="slds-form-element__control"> <lightning:select name="selectItem" label="Process Item" disabled="{!!v.save}"> <option value="1">Yes</option> <option value="2">No</option> </lightning:select> </div> <label class="slds-form-element__label" for="input-id-03">Process Contact ?</label> Save: {!v.Account.Contact__c} <aura:renderIf isTrue="{!v.save}"> <div class="slds-form-element__control"> <force:inputField value="{!v.Account.Contact__c}" class="foo" >{!v.Account.Contact__c}</force:inputField> </div> </aura:renderIf> <aura:renderIf isTrue="{!!v.save}"> <div class="slds-form-element__control"> <force:outputField aura:id="accountLookupOutput" value="{!v.Account.Contact__c}"/> </div> </aura:renderIf> </div> </div> </aura:component>My Js:
({ doInit : function(component, event, helper) { var getaccountdata = component.get("c.getAccount"); getaccountdata.setParams({ "Id": component.get("v.recordId")}); getaccountdata.setCallback(this, function(response){ var state = response.getState(); if (state === 'SUCCESS'){ console.log(response.getReturnValue()); component.set("v.Account",response.getReturnValue()); } }); $A.enqueueAction(getaccountdata); }
I get the associated account data for that account and then I set it back to the account variable attribute.
But on page load, I dont see the value in force:outputfield even though that account has that value populated in the field. Its the standard field so ideally it should have shown the value which is already in the account with the standard view .
Can anyone help me on this? if I missed something here
I also tried to put force:output field at the top as well but still the same its blank on page load
- Quddus Ololade 4
- March 25, 2018
- Like
- 0
- Continue reading or reply
Unable to use my wrapper class in Lightning component API version 42
Below Code:
Component Code:
This is speacially on the lightning component API 42 version, I have old component which is on 40 API version works absolutely fine.
Is this is a bug or not the right way to use wrapper any more in lightning ?
Any ideas appreciated !
Thanks
public class parentclass{ public class Model{ @AuraEnabled public String year {get;set;} @AuraEnabled public Map<Integer, Decimal> dataMap {get;set;} } }
Component Code:
<aura:component controller="parentclass" implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global"> <aura:attribute name="listVehicles" type="parentclass.Model[]" />Error: while saving the component: Failed to save undefined: Invalid <aura:attribute> type: Model
This is speacially on the lightning component API 42 version, I have old component which is on 40 API version works absolutely fine.
Is this is a bug or not the right way to use wrapper any more in lightning ?
Any ideas appreciated !
Thanks
- Quddus Ololade 4
- February 28, 2018
- Like
- 0
- Continue reading or reply
Getting started with JSON
Hi all,
Sorry for the newbie questions, but I've been hunting around for some information on how to use JSON in Salesforce and found some good resources however I've still got some questions about how Salesforce can receive a JSON feed from another system and process the results accordingly.
The scenario is Salesforce will be receiving a regular feed of master data (finance accounts) from an ERP system. Specifically the quetions I have are:
- I've found examples that show how to serialise and deserialise JSON messages, however how is the JSON Apex Class exposed so the sending system can deliver it's message?
- How is the request authenticated?
- How do you map the JSON message onto a Custom Object? Is it simply a case of looping through the message once it's deserialised and insert / upserting into the object?
Any help or pointers gratefully received.
- Pete1234
- March 21, 2013
- Like
- 0
- Continue reading or reply