• SUMAN KUMARI 70
  • NEWBIE
  • 60 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 16
    Replies
Hey All, 
I have a custom a field which has the value of a text as well as a link for an example 'Hey My name is leena. You can find me on https://www.google.com'. I am using this field to display on a Visualforce page but the text which I can see on the page is a complete text. I am not able to click on the link given in the text displayed. 

Kindly Let me know, how can I achieve this.

Thanks in advance for your time,
 
Hi All, 
Kindly help me with the test class for the following method. 
global PageReference confirmPage(){
        PageReference pageRef;
             if (appointment.id != NULL) {
                 pageRef = new PageReference('/apex/HAZMATconfirmationPage?appointmentId=' + appointment.id + '&cId=' + HAZMATCase.id);
        
             } else {
                 pageRef = new PageReference('/apex/HAZMATconfirmationPage?caseId=' + HAZMATCase.id);
        
             }
        return pageRef;
        }

 
Hi All, 
I have a requirement where I need to display a text "abc " in a visualforce email template. The condition is that the text should only be visible in the email if the Account record has a related list record of Contact and that contact record has an attachment to it.

Thanks a lot in advance. 
Kindly help me out with this asap.
Hi All, 
Following are the integrations in my org :-
1. SAP
2. Workers app
3. ConnectedBits (new API and whatever is left of existing integration)
4. GIS
5. Payment Gateway
6. Smarty Streets

I need to know the versions of each. How can I find there versions? 
Kindly help me with this.

Thanks a lot in advance.
Hi All, 
Currently whenever a case is created and is closed then a closure email is being sent to the owner. My case has a related list of WorkOrder, so whenever I have to close a case firstly I need to close the workorder record. Now my workOrder record has a notes & attachment related list, so before closing my work order I need to add an attchment to it. 

So the issue is, I need to refer that attachment in my HTML Email template which is being sent out on my case closure but I don't know how to refer that. 

Basically I need to refer my record's related list's(WorkOrder) related list(attachment).

Please do help me out with this. 

Thanks,
Suman
Hi All, 

Is there any out of box feature in salesforce through which we can send out an email everytime a resource is scheduled in fsl. 
I know this can be done through process builder/ workflow rule but is there any out of the box feature for it. 

Thanks a lot in advance.
 
Hi All, 
I have a requirement where according to a particular criteria I have to send an email to the owner 1 day prior to the CLOSED DATE filed and that too at exactly 8 am pacific time.

I have created a scheduled action which will send the email 1 day prior to the closed date but I don't know how to send out the email exactly at 8 am pacific time.

Please help me out with this, It's urgent.
Thanks,
Suman
Hi All, 
I have a requirement where I need to write a batch class which will run everyday and will send an email to the owner 1 day prior to the closed date at 8 am pacific time.
Kindly please help me by providing the code for this use case.

Thanks a lot in advance.
 
Hi All, 
I have an apex method where I hava  a for loop which is iterating over a list of items. That list has 2 items in it but the loop is returning only the 1st item. 
Can you guys please help me out with it and let me know where I am going wrong.
public static String getPrecission(String imageString){
        try{
            String modelIdValues = System.Label.quote_Id;
            if(!String.isBlank(quoteIdValues)){
                List<String> quoteIdLst = (quoteIdValues.contains(';')) ? quoteIdValues.split(';') : new List<String>{quoteIdValues};
                    
                if(quoteIdLst.size() > 0){
                    
                	String accessToken = getAccessToken();
                    
                    for(String quote: quoteIdLst){
                        
                        List<Vision.Precission> lstPricission = *****************;
                        
                        return JSON.serialize(lstPricission);
                    }
                }
            }
            return JSON.serialize(new List<Vision.Precission>());
        }catch(Exception e){
            System.debug(e.getMessage());
            return JSON.serialize(new List<Vision.Precission>());
        }
    }

Please do help me out, why for loop is iterating only for the 1st element of the list. 
Hi All, 

I have a requirement where I need to add a text beneath my header. It is a long text and it also includes few hyperlinks in it. 
Text should be left-justified, standard 'paragraph' text style. 
Following is the text that needs to be added :-

"This webpage displays reports submitted to the people. For other Reports, please visit respective webpage."

The word "respective" in the above page is a hyperlink which will redirect to a different vf page.

Please help me out with the code.

Thanks a lot in advance,
Suman
Hi All, 
I have a requirement where I need to export all the attchment files from my salesforce org to my local system.

It has to be the complete file and not the metadata.

Thanks a lot in advance,
Suman
Hi All, 

I have process builder where my criteria is that when a case is getting closed the owner should receive an email. And the email should be sent after 2 hours when the case gets closed. 

Somehow I am not getting the email after 2 hours when the case gets closed. Initially I thought the problem was with my logic. So I created an immediate action with the same action to send the sam email and surprisingly its working as expected.

Kindly help me where I am going wrong.

Thanks in advance,
Suman
Hi All, 

I am in my 4th challenge of lwc superbadge. Somehow I am not able to complete it. I am getting the following error:

Challenge Not yet complete... here's what's wrong:
We can’t find the return set properly in the boatTypes function in the component boatSearchForm JavaScript file. Make sure the component was created according to the requirements, including the right labels and values to populate the searchOptions, and the proper case-sensitivity.


Please find my code below and let me know where I am going wrong:-
<template>
    <lightning-layout horizontal-align="center">
      <lightning-layout-item class="slds-align-middle">
        <lightning-combobox class="slds-align-middle"
        name="boatTypes"
        value={selectedBoatTypeId}
                onchange={handleSearchOptionChange}
                options={searchOptions}></lightning-combobox>
                
      </lightning-layout-item>
    </lightning-layout>
  </template>
 
import { LightningElement, track, wire } from "lwc";
import getBoatTypes from "@salesforce/apex/BoatDataService.getBoatTypes";

export default class BoatSearchForm extends LightningElement {
  selectedBoatTypeId = "";

  // Private
  @track error = undefined;
  @track searchOptions;
  @track selectedBoatTypeId = "";

  // Wire a custom Apex method
  @wire(getBoatTypes)
  boatTypes({ error, data }) {
    if (data) {
      this.searchOptions = data.map((type) => {
        return {
          label: type.Name,
          value: type.Id
        };
      });
      this.searchOptions.unshift({ label: "All Types", value: "" });
    } else if (error) {
      this.searchOptions = undefined;
      this.error = error;
    }
  }

  // Fires event that the search option has changed.
  // passes boatTypeId (value of this.selectedBoatTypeId) in the detail
  handleSearchOptionChange(event) {
    // Create the const searchEvent
    // searchEvent must be the new custom event search
    event.preventDefault();
    this.selectedBoatTypeId = event.detail.value;
    const searchEvent = new CustomEvent("search", {
      detail: {
        boatTypeId: this.selectedBoatTypeId
      }
    });
    this.dispatchEvent(searchEvent);
  }
}

 
Hi All,
I have a business requirement where I want a particular record to be viewd by system admin only and no other user should be able to view the record. Even if the other user knows the record number, he should get an error when trying to open that particular record.

Is there any out of box functionality provided by the salesforce to achieve this? 
Thanks a lot for your help in advance.

Thanks,
Suman
Hi I am new to apex and I have a requirement to write a test class for my apex class.
Please refer the class below:-
public with sharing class auth {
    
    public String lang { get; set; }
    public auth() {
        String langCode = ApexPages.currentPage().getParameters().get('language');
        if (langCode == 'EN' || langCode == 'ES') {
            lang = langCode;
        }
        else {
            lang = 'EN';
        }
    }
    
    public PageReference changeLanguage() {
        lang = (lang.equalsIgnoreCase('EN')) ? 'ES' : 'EN';
        return null;
    }
}

Please do help me out with this.
Thanks a lot in advance.
I have a requirement where if a person tries to upload a file which is encrypted my vf page will throw an error. 

Please let me know how can I achieve this.

Thanks in advance.
I have a Mobile application that uses REST Services to provide the functionality. Mobile application is also multi-lingual and depends on the current device language. They have a Sign In button using which they do an OAUTH  and  Login page (specific to app) opens up. How can I send a language parameter in the OAUTH URL and then read that parameter to open the Login Page in the corresponding language (English/Spanish).
I have a visualforce page on which a link is present. When that link is looking in English, the record is displayed as Spanish and when the link is visible as spanish, the record should be displayed in English.

I have to write this logic in a new apex controller.
And also the page should be displayed in English by default.

Thanks in advance for your help!!
 
Hi All,
I have a requirement to display my phone number on my visualforce page in three- digit format. This format change will only be done when there are only three digits preceded with zeros or three digits appended with zeros.

Example: Instead of 000-000-0711 or 711-000-0000, number will be displayed as 711.


Thank you so much for you help in advance.
 
My test class is failing stating that "Methods defined as TestMethod do not support Web service callouts". Please find my classes below:-

@RestResource(urlMapping='/Accounts/*/contacts')
global class AccountManager {
    @HttpGet
    global static Account getAccount() {
        RestRequest req = RestContext.request;
        String accId = req.requestURI.substringBetween('Accounts/', '/contacts');
        Account acc = [SELECT Id, Name, (SELECT Id, Name FROM contacts) 
                       FROM Account WHERE Id = :accId];
        return acc;
    }
}




@isTest
private class AccountManagerTest {
@isTest
    private static  void testGetAccount(){
        Id recordId = createTestRecord();
        RestRequest request = new RestRequest();
        request.requestUri = 'https://sumankumari360-dev-ed.my.salesforce.com/services/apexrest/Accounts/'+recordId+'/contacts';
        request.httpMethod = 'GET';
        RestContext.request = request;
        Account thisAccount = AccountManager.getAccount();
        System.assert(thisAccount != null);
        System.assertEquals('Test record', thisAccount.Name);
    }
    static Id createTestRecord(){
         Account TestAcc = new Account(
          Name='Test record');
        insert TestAcc;
        Contact TestCon= new Contact(
        LastName='Test', 
        AccountId = TestAcc.id);
        return TestAcc.Id;
    }      
}
    
}
Hi All, 

I have process builder where my criteria is that when a case is getting closed the owner should receive an email. And the email should be sent after 2 hours when the case gets closed. 

Somehow I am not getting the email after 2 hours when the case gets closed. Initially I thought the problem was with my logic. So I created an immediate action with the same action to send the sam email and surprisingly its working as expected.

Kindly help me where I am going wrong.

Thanks in advance,
Suman
Hi All, 
I have a requirement where I need to write a batch class which will run everyday and will send an email to the owner 1 day prior to the closed date at 8 am pacific time.
Kindly please help me by providing the code for this use case.

Thanks a lot in advance.
 
Hi All, 
I have an apex method where I hava  a for loop which is iterating over a list of items. That list has 2 items in it but the loop is returning only the 1st item. 
Can you guys please help me out with it and let me know where I am going wrong.
public static String getPrecission(String imageString){
        try{
            String modelIdValues = System.Label.quote_Id;
            if(!String.isBlank(quoteIdValues)){
                List<String> quoteIdLst = (quoteIdValues.contains(';')) ? quoteIdValues.split(';') : new List<String>{quoteIdValues};
                    
                if(quoteIdLst.size() > 0){
                    
                	String accessToken = getAccessToken();
                    
                    for(String quote: quoteIdLst){
                        
                        List<Vision.Precission> lstPricission = *****************;
                        
                        return JSON.serialize(lstPricission);
                    }
                }
            }
            return JSON.serialize(new List<Vision.Precission>());
        }catch(Exception e){
            System.debug(e.getMessage());
            return JSON.serialize(new List<Vision.Precission>());
        }
    }

Please do help me out, why for loop is iterating only for the 1st element of the list. 
Hi All,
I have a business requirement where I want a particular record to be viewd by system admin only and no other user should be able to view the record. Even if the other user knows the record number, he should get an error when trying to open that particular record.

Is there any out of box functionality provided by the salesforce to achieve this? 
Thanks a lot for your help in advance.

Thanks,
Suman
Hi I am new to apex and I have a requirement to write a test class for my apex class.
Please refer the class below:-
public with sharing class auth {
    
    public String lang { get; set; }
    public auth() {
        String langCode = ApexPages.currentPage().getParameters().get('language');
        if (langCode == 'EN' || langCode == 'ES') {
            lang = langCode;
        }
        else {
            lang = 'EN';
        }
    }
    
    public PageReference changeLanguage() {
        lang = (lang.equalsIgnoreCase('EN')) ? 'ES' : 'EN';
        return null;
    }
}

Please do help me out with this.
Thanks a lot in advance.
Hi All,
I have a requirement to display my phone number on my visualforce page in three- digit format. This format change will only be done when there are only three digits preceded with zeros or three digits appended with zeros.

Example: Instead of 000-000-0711 or 711-000-0000, number will be displayed as 711.


Thank you so much for you help in advance.
 
Hi All,
I want to create a package in salesforce which will pass all the values of a public tableau dashboard as a parameter. Intergrating tableau dashboard sould be dyanamic.

Thanks a lot in advance.
I have a button in lightning with an onClick Javascript - window.open('/apex/VIPFORM__VIP_FormWizard?id={!Document_Review_Feedback_Form__c.Id}', '_blank');

I want to convert this button in lightning. Please do suggest me a way to do it. Thanks in advance.
My related list of an object has a picklist field. I want few values from that field to be removed. How can I do this. 
Thanks in advance for your help.
Hi All,
We have been using Salesforce Classic in our organisation and are planning to move to Lightning. We are planning to use Lightning Experience Configuration Converter Tool for VisualForce Pages. 
Is this tool safe to use or in any case will it indeliberately affect the data in our org. 
Thanks in advance for your help.