• Divya Agrawal 14
  • NEWBIE
  • 32 Points
  • Member since 2017
  • Technical Lead
  • Nagarro


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 12
    Replies
Hi everyone

Below is my code for showToast but it invokes on doinit(). The problem is I have to reload the page to see the Toast as a notification. Is there a way to fire the toastEvent automatically on a specific time. 

doInit : function(component, event, helper) {
        var action = component.get("c.getAlertDateTime");
            action.setCallback(this, function(response){
                var state = response.getState();
                if(state === "SUCCESS"){
                    var result = response.getReturnValue();
                    var date = new Date();
                    var Today = date.toISOString();
                    for(var i=0; i!=result.length; i++){
                        if(result[i].pshak__Alert_Date_Time__c <= Today){
                            var toastEvent = $A.get("e.force:showToast");
                            toastEvent.setParams({
                                title : 'Note Reminder',
                                message: 'Check out your note \''+result[i].Name+'\'',
                                type: 'warning',
                                mode: 'sticky',
                                });
                            toastEvent.fire();
                        }
                    }
                    component.set("v.notesList", result);
                }
            });
            $A.enqueueAction(action);
    }

Thanks.
 
Requirement: Need to align inputfields in left for pageblocksection with column=1 for lightning

Problem: for the classic it is showing in left and for lightning, it comes in the center 

column should show in left side

For Classic
View in classic

COde 
<apex:page  lightningStylesheets="true" standardStylesheets="false">
    <apex:form id="pageBlock">
        <apex:outputPanel >
            <apex:pageBlock title="Organisational role">
                <apex:pageBlockSection columns="1">
                    <apex:inputField id="Licensee_or_Organisation__c" value="{!}" required="true" />
                    <apex:inputField id="Types__c" value="{!orgRole.Types__c}" required="true"/>
                    <apex:inputField id="Email__c" value="{!orgRole.Email__c}"/>
                    <apex:inputField id="Phone__c" value="{!orgRole.Phone__c}"/>
                </apex:pageBlockSection>
                <apex:pageBlockSection columns="3">
                    <apex:commandButton action="{!cancel}" value=" Cancel " immediate="true"/>
                    <apex:commandButton action="{!step2}" value="  Next>>  " reRender="pageBlock"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:outputPanel>
</apex:form>
<apex:page>

Using lightningStylesheets = true for lightning pages

Can you please suggest the changes can do aligning column in left.

Thanks,
Divya



 
Requirement: To create lead record from the external system through URL in Salesforce Lightning

In Classic it is working through URL: 'https://na7.salesforce.com/00Q/e?retURL=/00Q/o&lea8=7053562448&lea5=Geoprospected&name_lastlea2=TBD&lea13=Uncontacted' + '&00N37000005v4Oi='

when I enter the above URL in the address bar for Salesforce Classic. A new record with a prefilled mobile field shows
Classic View

Problem: When I switch to lightning and enter the same URL. then fields are not prefilled 

Lightning Screen 

Please help

Thanks & Regards,
Divya

 
User-added image
https://ap4.salesforce.com/analytics/wave/web/insertmap.apexp

Create a Custom Map for Analytics Charts 
Work with GeoJSON and Create the Map
Challenge URL: https://trailhead.salesforce.com/projects/wave_charts_custom_map/steps/wave_charts_custom_map_geojson?trailmix_creator_id=00550000006FDjQAAW&trailmix_id=sharpen-your-analytics-edge
In the batch apex, I want to send email if the 'count of record created today' is greater than 'the count of record created t yesterday'. Any help is really appreciated.
hello i'm new to falesforce i have a class apex to return opportunity of a logged in user and i want to diplay it but it returns empty fields can please somebody help me with it 
here is apex class :
public with sharing class opportunitiesId {
    @AuraEnabled(cacheable=true)
    public static Opportunity getOpportunityByClient() {
       Id userId = UserInfo.getUserId();
       Id  contactId = [SELECT ContactId FROM User WHERE Id = :userId].ContactId;
       Opportunity opportunity=[SELECT Id, Name, InterestRate__c, Tenure__c FROM Opportunity WHERE ContactId = :contactId  LIMIT 1];
       system.debug('hello'+ opportunity );
       return opportunity;
    }} 

and this is js:
import { LightningElement ,api,wire} from 'lwc';
import getOpportunityByClient from '@salesforce/apex/opportunitiesId.getOpportunityByClient';
export default class NegotiateInterestRateAndTenure extends LightningElement {
    @api recordId;
    interestRate;
    tenure;
//tableau de liste   demandes
    @wire(getOpportunityByClient)
    opportunity({ error, data }) {
       
        if (data) {
           
           
            this.interestRate = data.interestRate__c;
            this.tenure = data.tenure__c;
            console.log(data.interestRate__c);
        } else if (error) {
            console.log('error' + error);
           
        }
    }
    connectedCallback(){
        console.log('bonjour');
    }}
 
  • April 19, 2023
  • Like
  • 0
Can we create a report type and add a process instance, process instance node, and custom object?
As we have one requirement to create a report where we need data from the Approval process along with custom object.
We are able to create a report using process instance and process instance node but not able to add any other columns from custom object.
Kindly suggest any possible actions on the same.
Hi everyone

Below is my code for showToast but it invokes on doinit(). The problem is I have to reload the page to see the Toast as a notification. Is there a way to fire the toastEvent automatically on a specific time. 

doInit : function(component, event, helper) {
        var action = component.get("c.getAlertDateTime");
            action.setCallback(this, function(response){
                var state = response.getState();
                if(state === "SUCCESS"){
                    var result = response.getReturnValue();
                    var date = new Date();
                    var Today = date.toISOString();
                    for(var i=0; i!=result.length; i++){
                        if(result[i].pshak__Alert_Date_Time__c <= Today){
                            var toastEvent = $A.get("e.force:showToast");
                            toastEvent.setParams({
                                title : 'Note Reminder',
                                message: 'Check out your note \''+result[i].Name+'\'',
                                type: 'warning',
                                mode: 'sticky',
                                });
                            toastEvent.fire();
                        }
                    }
                    component.set("v.notesList", result);
                }
            });
            $A.enqueueAction(action);
    }

Thanks.
 
I am looking for a sales and service cloud functional consultant from India. I am will to pay INR 1000 per hour. 

I am already a salesforce consultant myself and my intention is to project manage/engagement manage customers. I will do all the client side requirement gathering and solution design. What I am looking for is someone to configure the application. I will then do QA, UAT and handover

Must Have
Be currently salesforce certified - Admin 201, sales cloud, service cloud.
Good communication skills
Fluent in English
Can get things completed.

 
Contract Salesforce developer in Morrisville, NC
We need a short term contract apex/visualforce developer to help with the transition from Classic to Lightning.
 
Looking for a local developer only to be on-site for a few weeks.
 
No recruiters please
Hey Salesforce Admins!

I am looking for Salesforce Administrators for hire in the Greater Los Angeles area. 

If you or someone you know is looking for a new role in your career get in contact with me.

Send Resumes to J.graham1@masonfrank.com
Linkedin: https://www.linkedin.com/in/jgrah3/
I'm working on this trailhead module: 
https://trailhead.salesforce.com/sales_admin/sales_admin_sales_reports_for_lex/sales_admin_sales_reports_unit_1

I'm getting an error: Challenge Not yet complete... here's what's wrong: 
The 'Closed Business YTD' report does appear to be filtered on 'Opportunity Status: Closed Won'.

The field is called Stage NOT Opportunity Status. Am I missing someothing really basic? 
User-added image
 
Can we change account record type from Business Account to a Person Account?