• Magulan D
  • 1724 Points
  • Member since 2012

  • Chatter
  • 55
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 10
  • 684
I have built a new App for end users to use to access HD services. I am building a new component to house large buttons that will launch flows that in turn will create new cases.

So far, so good.

When I click the buttons, the flow opens in a new tab. The user completes the steps and a case is created.

Again, all good.

I do not like the user experience with the new tab though. When they click the Finish button at the end, it just takes them back to the opening screen element and does not close the tab.

What I am looking for is an experience that is more like what i get when I launch a flow from say a contact record as a quick action. That opens the flow in a some sort of sub process like this:
User-added image

User-added image

User-added image
And the sub process then closes when the user clicks the Finish button.

Is there a way to accomplish this same effect from within this new component I have built? some HTML or other that will open the flow in this same sort of process? The best I have managed so far is the separate tab and that is just not doing it for me.

Any suggestions?
Best regards,
Hi guys,

I'm having issues calling an url from salesforce. 
Here is th code.
private final String clientId = 'xxxxxxxxx';
private final String clientSecret = 'xxxxxx';
String reqbody = 'grant_type=password&client_id='+clientId+'&client_secret='+clientSecret;
Http http = new Http();
HttpRequest request = new HttpRequest();
HttpResponse response = http.send(request);
if (response.getStatusCode() != 201) {
  System.debug('The status code returned was not expected: ' +
       response.getStatusCode() + ' ' + response.getStatus());
} else {
I'm getting the following message - response|"System.HttpResponse[Status=Service Unavailable, StatusCode=503]".
I've added the site url in salesforce. 

Please let me what I'm doing wrong?!

Appreciate your help!

Is the wire service in LWC Synchronous or Asynchronous?  Is there a way to capture data from a wire inquiry and use it in a second wire service. Can you call a wire service or is it only  called when the component is loaded? Can LWC be used in a 3rd party App with Angular or React?
Howdy all,
My company is looking for a good way to keep track of which companies are subscribed to different products, especially with little data entry. Would any of you have any suggestions, how your company handles this, anything pre-built in to salesforce we should be using, that sort of thing. It would be very nice to go to a companies record and see which services and products they are currently using. Any and all input would be greatly appreciated!
Hi Team,
Any one is having the lightning documentation is done by their own.
If have please provide.. Thanks in advance\

I just got a new PC and have loaded the Data Loader on it.  I have successfully logged in and am trying to export a file but get the following error:
I have created a folder for the files to export to but cannot get rid of this error?
Orgs are limited to the number of Dynamic Dashboards that can be used.

However we were curious if we could create some custom Lightning Components that could somehow copy the functionality of a Dynamic Dashboard?  This would allow us to circumvent that limit somehow.  

I know it's a long shot and would require some sort of developer know-how.
Hello Folks,

How can I get the log files of process builder. To be specific I need to log file of process builder & what it has created or inserted.
Any help is appreciated.

Thank you!!
I want to see debug statements for a specific Apex Class only - how do I do this?  I have went out to debug logs and set debug up on that specific class, however, the logs listed are only by user.  Am i overlooking something - or is there a different place to see the logs set up for the class?

I have also attemped to set up a debug level that has "NONE" for all except Apex Code (which I have set to "DEBUG") - however I get so many logs for the user when I have this set and have no way to quickly find the specific one that I would be looking for with the debug statements.

Any help / advice on how to quickly see the debug statements for a given user or apex class would be much appreciated.  I must be doing something incorrectly to get so many logs.

Hi Team,
Just I created two components. My requirement is need to navigate one component to another component when i click on my image.
But i am getting some error like...This page has an error. You might just need to refresh it.
Action failed: c:Component1$controller$click [Cannot read property 'setParams' of undefined].
                Please help me on this... Thanks in advance...


<ul class="slds-list--horizontal slds-has-dividers_around-space" onclick="{!c.click}">

  <lightning:layout >
            <lightning:layoutItem size="3" padding="around-small">
                 <div class="img " >
                    <img  style="height: 100px;" src="/resource/Images/Assets/1.png"  />   
            <lightning:layoutItem size="3" padding="around-small">
                <div class="img1" >
                    <img style="height: 100px;" src="/resource/Images/Assets/2.png"  />  
            <lightning:layoutItem size="3" padding="around-small">
               <div class="img2" ><img style="height: 100px;" src="/resource/Images/Assets/3.png" align="middle" />      
            <lightning:layoutItem size="3" padding="around-small">
                <div class="img3"  style="text-align: left">
                    <img style="height: 100px;" src="/resource/Images/Assets/4.png"/>  




       var evt = $A.get("e.force:navigateToComponent");
            componentDef : "c:Component2",
Hi Team, 

I am having datatable with pagenation concept. As of now i am displaing the records.My requirement is
need to populate the checkbox beside the records what i am getting from the object. And need to sort  records based onReference image colum headers.  At a time we need to check only one check box. After checking that check box i need to click on above any one of the four images iam having 4 images above my datatable and  that should navigate to another component ex: abc.cmp with that checked record Id.Please kindly help me on this.

                                                                                         Thanks in advance...


public class ContactAuraController {
    public static ContactDataTableWrapper getContactData(Decimal pageNumber, Decimal pageSize) {
        Integer pSize = (Integer)pageSize;
        Integer pNumber = (Integer)pageNumber;
        //Offset for SOQL
        Integer offset = (pNumber - 1) * pSize;
        //Total Records
        Integer totalRecords = [SELECT COUNT() FROM Contact];
        Integer recordEnd = pSize * pNumber;
        //Instance of Contact DataTable Wrapper Class
        ContactDataTableWrapper objDT =  new ContactDataTableWrapper();  
        objDT.pageSize = pSize;
        objDT.pageNumber = pNumber;
        objDT.recordStart = offset + 1;
        objDT.recordEnd = totalRecords >= recordEnd ? recordEnd : totalRecords;
        objDT.totalRecords = totalRecords;
        objDT.contactList = [SELECT Id, Name, Phone, Email FROM Contact ORDER BY Name LIMIT :pSize OFFSET :offset];
        return objDT;
    //Wrapper Class For Contact DataTable  
    public class ContactDataTableWrapper {
        public Integer pageSize {get;set;}
        public Integer pageNumber {get;set;}
        public Integer totalRecords {get;set;}
        public Integer recordStart {get;set;}
        public Integer recordEnd {get;set;}
        public List<Contact> contactList {get;set;}


<aura:component controller="ContactAuraController">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="ContactList" type="Contact[]"/>
    <aura:attribute name="PageNumber" type="integer" default="1"/>
    <aura:attribute name="TotalPages" type="integer" default="0"/>
    <aura:attribute name="TotalRecords" type="integer" default="0"/>
    <aura:attribute name="RecordStart" type="integer" default="0"/>
    <aura:attribute name="RecordEnd" type="integer" default="0"/>
    <div class="slds-m-around_xx-large">
        <h1 class="slds-text-heading--medium">Contacts</h1>
        <div class="slds-float_right">
            <ui:inputSelect aura:id="pageSize" label="Display Records Per Page: " change="{!c.onSelectChange}">
                <ui:inputSelectOption text="10" label="10" value="true"/>
                <ui:inputSelectOption text="15" label="15"/>
                <ui:inputSelectOption text="20" label="20"/>
        <table class="slds-table slds-table_bordered slds-table_cell-buffer">
                <tr class="slds-text-title_caps">
                    <th scope="col">
                        <strong><div class="slds-truncate" title="Name">Name</div></strong>
                    <th scope="col">
                        <strong><div class="slds-truncate" title="Phone">Phone</div></strong>
                    <th scope="col">
                        <strong><div class="slds-truncate" title="Email">Email</div></strong>
                <aura:iteration items="{!v.ContactList}" var="con"> 
                        <th scope="row" data-label="Name">
                            <div class="slds-truncate" title="{!con.Name}">{!con.Name}</div>
                        <th scope="row" data-label="Phone">
                            <div class="slds-truncate" title="{!con.Phone}">{!con.Phone}</div>
                        <th scope="row" data-label="Email">
                            <div class="slds-truncate" title="{!con.Email}">{!con.Email}</div>
        <div class="slds-clearfix">
            <div class="slds-page-header" role="banner">
                <div class="slds-float_right">            
                    <lightning:button disabled="{!v.PageNumber == 1}" variant="brand" aura:id="prevPage" label="Prev" onclick="{!c.handlePrev}" />            
                    <lightning:button disabled="{!v.PageNumber == v.TotalPages}" aura:id="nextPage" variant="brand" label="Next" onclick="{!c.handleNext}"/>
                <p class="slds-page-header__title">{!v.RecordStart}-{!v.RecordEnd} of {!v.TotalRecords} | Page {!v.PageNumber} of {!v.TotalPages}</p>

    doInit: function(component, event, helper) {
        var pageNumber = component.get("v.PageNumber");  
        var pageSize = component.find("pageSize").get("v.value"); 
        helper.getContactList(component, pageNumber, pageSize);
    handleNext: function(component, event, helper) {
        var pageNumber = component.get("v.PageNumber");  
        var pageSize = component.find("pageSize").get("v.value");
        helper.getContactList(component, pageNumber, pageSize);
    handlePrev: function(component, event, helper) {
        var pageNumber = component.get("v.PageNumber");  
        var pageSize = component.find("pageSize").get("v.value");
        helper.getContactList(component, pageNumber, pageSize);
    onSelectChange: function(component, event, helper) {
        var page = 1
        var pageSize = component.find("pageSize").get("v.value");
        helper.getContactList(component, page, pageSize);


    getContactList: function(component, pageNumber, pageSize) {
        var action = component.get("c.getContactData");
            "pageNumber": pageNumber,
            "pageSize": pageSize
        action.setCallback(this, function(result) {
            var state = result.getState();
            if (component.isValid() && state === "SUCCESS"){
                var resultData = result.getReturnValue();
                component.set("v.ContactList", resultData.contactList);
                component.set("v.PageNumber", resultData.pageNumber);
                component.set("v.TotalRecords", resultData.totalRecords);
                component.set("v.RecordStart", resultData.recordStart);
                component.set("v.RecordEnd", resultData.recordEnd);
                component.set("v.TotalPages", Math.ceil(resultData.totalRecords / pageSize));

We had Salesforce create a Health Assessment report for us.  Found that we had 6 Apex Classes / 2 Apex Triggers / 5 Visualforce Pages that were using old versions of API's.  Within the "New Code using old API" section we had 37 Apex Classes / 2 Apex Triggers / 4 Visualforce Pages using old versions of API's.

We are new to this process so any guidance / answers / suggestions would be much appreciated for the following questions:
What are others doing to keep API's as current as possible (would it be a good practice to set time aside once a year to make sure all Classes / Triggers / Pages are using the most current version of API's)?  We are requiring when code is updated to upgrade to latest API, but sometimes code doesn't change often.
Can someone give a guess or rough estimate the amount of time it would take 2 people to go through process of upgrading to the latest versions of API's?  (ie so many hours per change or estimate of 40/80/120 ... hours)
What is the recommended process for Apex Classes to upgrade to the latest API version.
What is the recommended process for Apex Triggers to upgrade to the latest API version.
What is the recommended process for Visualforce Pages to upgrade to the latest API version.
Thanks for any guidance you can provide.  Trying to keep our environment as stable / healthy as possible.

We need to create a process that loops through an order once it has been submitted and determine if it has duplicate items.  If it does, we would delete the duplicate from the order automatically.  We are still learning from the tools available. When reading through the order items, we will match on the SKU / Category - if there is more than 1 occurrence within that order, we wish to delete the last occurence.

Haven't figured out how to do this yet in Work Flow / Process Builder.  Wondered if someone with more experience on the various options can give the best practice solution?


If I assign a profile to a user, with field level security specified for a concrete field, and I assign a permission set to the same user, with a different permission level specified for that field, which one takes precedence? the most restrictive? Thanks

If i make Changes to Profiles in Dev sandox how can i deliver it to Production. as i see nothing avaialble in change sets for profiles.

Thank you
<apex:variable var="count" value="{!1}"/>
         <apex:commandButton action="{!add}"  id="button" styleClass="button"  image="{!URLFOR($Resource.add)}" reRender="idForm">
                <apex:param name="paramValue2" value="{!count}" assignTo="{!rows}"/>
            <apex:variable var="count" value="{!count + 1}"/>

<apex:selectList size="1" value="{!operator}" id="operator" styleClass="basic">
                <apex:selectOption itemValue="Select Operator"/> 
                <apex:selectOption itemLabel="Equals" itemValue="="/>
                <apex:selectOption itemLabel="Greater or equals to" itemValue=">="/>
                <apex:selectOption itemLabel="Lesser or equals to" itemValue="<="/>

I want a use case where user clicks on a button and the selectlist is added.

One cleick one select list is added and it will happen consecutiveely.

I also want to have appropriate controller.

Any tutorial on net will be helpful

  • April 27, 2015
  • Like
  • 0
Hello Community

I am new to Salesforce and I am wanting to try and write a new trigger but I am getting an error message saying Entity Locked.  Cannot create Apex Trigger on an Avtive Organisation

Can anyone help? I tried logging a call with Support but they redirected me here for help


I have two users with same profile but  different roles

user1 is created some 3 reports.

Now i want to give access to user2 that all reports......

Hey there,

I have begun coming into problems with my triggers on the same object and I was told that a trigger handler class may be the answer to these. Would someone perhaps be able to guide me through how to write one and the negative and positive effects of doing so. thank you in advanced for your time
Is it possible to show the marker in Green color instead of red color in lightning:map tag?
How to set the Popup width while using LookupHoverDetail.getHover(). If anyone has sample code, it will be very useful.
I am looking for good materials and sample questions for Service cloud exam.
String accessToken = Auth.AuthToken.getAccessToken(authProviderId, 'Open ID connect');
        system.debug('Access Token is ' + accessToken);

here authProviderId has my Auth. Provider id.

It is returning null value.

I would like to write a trigger, when the user logins in and logs out.





 how to get Application name using Apex?



Magulan D

How to view Answers in Site without logging in?



Magulan D

How many records can be exported using export details in reports?



Magulan D

How many records can be exported using Export Details button in reports?

I want to post from VF page to Facebook.


Can anyone help?



Magulan D

Hi All,

Does anyone have idea if lightning web components are supported in Site.com? If yes, kindly share the details. If no, any idea when it will be available?
Can anyone help how to stop users from receiving emails by doing changes at user level in salesforce?
Requirement :

Fetch the **PDF file** from SFTP server, after fetching the file (based on the accountId) attach back to the Notes and Attachment related list of the account object.

The following third parties are able to process the CSV file to the corresponding object, but not the PDF files to Notes and attachments.

 - Xplenty 
 - Skyvia  
 - Rssbuss

is there any way to fetch the PDF files from SFTP to Salesforce?
write a trigger to prevent duplicate contact with email on selected account trigger should throw exception  and also when duplicate contact is inserted
For example, is it appropriate to display the Salesforce logo, or display a phrase such as "Salesforce Consulting Partner" or "Salesforce Integration Services" with this level of certification.

Any thoughts on this topic would be very helpful.
I'm looking to move a templates from Salesforce Enterprise to Professional. Is there an easy to do this? 
Hey guys so i have read a lot about the force navigation on the internet but here i am talking about lightning web components and not the aura components. I have an html file where the custom button is and a javascript file where i can create a function. I have came across:

navigate : function(component, event, helper) { //Find the text value of the component with aura:id set to "address" var address = component.find("address").get("v.value"); var urlEvent = $A.get("e.force:navigateToURL"); urlEvent.setParams({ "url": 'https://www.google.com/maps/place/' + address }); urlEvent.fire(); }

but i don't know how this will work in the lightning web components so guys i need help to open another lightning web component page onclick of a button in another lightning web component page.
Hi all,

I was wondering if there is a possibility not to hard code the location of images in email templates. We are linking images with a Sandbox location, what happens if the image is deleted or moved to another environment?.
For example, we have the following code in the email template and the email template is in the Salesforce instance CS109:
<img align="center" alt="Image" border="0" class="center autowidth" src="https://c.cs110.content.force.com/servlet/servlet.ImageServer?id=0150Q000000C8yp&oid=00D0Q0000009cAu&lastMod=1557822678000" style="outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; clear: both; border: 0; height: auto; float: none; width: 100%; max-width: 300px; display: block;" title="Image" width="300"/>
I would appreciate any advice about best practices in such a case.

Under Accounts > Change Account Owner
there are several checkboxes that we always want checked when we change the account owner. Usually we have to check all 5 boxes by hand, and are hoping there is a way to have them checked by default, or to add a check all button. 


I have turned on "Lightning View" on my organization's Sandbox. When clikcing on the "Opportunity" tab (I have the NPSP installed) the browser gets stuck on a refresh loop perpetually. Interestingly if I close my browser and log in again, and click on the arrow and choose a specific opportuity or view, it loads just fine! I do not have this issue in the Classic View.

Any suggestions?

Refresh Loop (https://media.giphy.com/media/L40v3X4RC3Fl7J585M/source.mp4)
1. Report on a campaign that have contributed to an Opportuntity
2. View the entire Campaign Hierarchy
3. Adjust the percentage of influence has campaign has on opportunity
4. Summarize campaign member statisitics on a campaign.

According to my understanding Answer is 1.
Kindly help!
Hye everyone!

I don't know if it would be possible to create a quote wihtout been attached to an opportunity. Does anyone know any workaround?
I have a requirement where if my field 'Branch' is not null then only the other field 'ActivityDate' should be enabled. Otherwise it should be disabled.
And also if i change the Branch value then ActivtyDate field should rest to null. I want to implement this change in Lightning 

I am using a lightning:datatable to display data-
 <lightning:datatable columns="{!v.columns}"
                             show-row-number-column= "true"  
                             onrowselection="{! c.getSelectedRow}"/>

Using a button to validate the data before it gets updated in salesforce.
Sending a response back to helper in Map<Id, String> -

response- {"a1Fn00000007AEpEAM":"This contact is already assigned as an Emergency Contact, choose a different contact and save","a1Fn00000007AEoEAM":"This contact is already assigned as an Emergency Contact, choose a different contact and save","a1Fn00000007AF9EAM":"This contact is already assigned as an Emergency Contact, choose a different contact and save","a1Fn00000007AF8EAM":"This contact is already assigned as an Emergency Contact, choose a different contact and save","a1Fn00000007AFTEA2":"This contact is already assigned as an Emergency Contact, choose a different contact and save","a1Fn00000007AFSEA2":"This contact is already assigned as an Emergency Contact, choose a different contact and save"}

As per lightning documentation, lightning:datatable attribute error shoudl be set in following format-
{ rows:
{ b:
{ title: 'We found 2 errors.',
messages: [ 'Enter a valid amount.', 'Verify the email address and try again.' ],
fieldNames: ['amount', 'contact'] }
{ title: 'Your entry cannot be saved. Fix the errors and try again.', messages: [ 'Row 2 amount must be number', 'Row 2 email is invalid' ]

I am not sure how to iterate over a map to set error attribute in this format. Any help will be appreciated.

Hi All,
I have created a Process Builder which should fire an email alert for the approver after 1 hr of getting created based on the Criticality of Case.
However it does not seem to work as expected though the criteria is met. Not sure what is missing from my end.
Approval Process

The criteria formula is evaluating to true with the data I have created.
Scheduled Action

Can somebody help me in this regards.



I have a class that posts opportunity details into a slack channel. It works fine but all currency values are being displayed without sepeators for thousands. One thousand is currently displayed as 1000.00 and I want to display 1,000 without commas. 

How do I modify this code to make those changes:

  text += '*Amount*: ' + opportunity.Amount.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*One Time Revenue*: ' + opportunity.One_Time_Revenue__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Added ARR*: ' + opportunity.Opp_Added_ARR__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Content ARR*: ' + opportunity.Added_Content_ARR_Static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
        text += '*Coach ARR*: ' + opportunity.Added_Readiness_ARR_static__c.setScale(2) + ' ' + opportunity.CurrencyISOCode + '\n';
Hi there,
I am using a Lightning:Maps component to plot a series of markers. When we have a lot of markers, we see in the Javascript's console log window "mapsloader?resource=primitiveMap&version=220:151 Error: Geocoding <Address removed for privacy reasons> failed. Google geocoder status is OVER_QUERY_LIMIT"

I can reduce the amount of requests a little, but I don't expect it to be enough. Does anyone have had the same issue?
I think of this solutions:
  • Pay Google for less limitations -> Is that even possible, as lightning:map uses a Salesforce-owned Google Api key?
  • Reduce the amount of requests -> What exact are the limitations? I searched on Google Documentation, but didn't find hard numbers
  • Build a custom lightning map -> Anyone who did this before?
  • Use a solution from Github -> Any recommendations, anyone experience with https://github.com/zyzbroker/LightningMap ?
Any suggestions, answers, ideas are much appreciated!
Hi Team,

I see the controller classes mentioned below in my salesforce org,

Could you please,
1) Let me know how to find what created these controllers automatically? Where is that triggered from?
2) Provide functionality description for these controllers?
3) Let me know if its mandatory to use these controllers?
What is the best way integration between two clouds, Here the requirement is integrate from salesforce cloud to amazon cloud..
  • April 22, 2014
  • Like
  • 1