• Jaanu
  • NEWBIE
  • 190 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 73
    Questions
  • 93
    Replies
One of my Users unable to update their own Task fields and while updating the data, it shows the error like "insufficient access rights on object id". As an administrator, i dont want to give "Modify All' access to my user. if i gave "Modify all" access to user, My user able to update their own Task information.
  • May 24, 2020
  • Like
  • 0
I have 3 fields in Case Object. 
1. Status
2. Substatus - Controlling field is Status
3. Reason - Controlling field is Substatus

When user is changing the status field on a screen, Substatus field is spaced out bec Status is controlling field. But Reason field is not spaced out. 

Requirement is that when user changes Status picklist value, we need to space out Substatus and Reason as well. Can you please let me know how to achieve this functionality. Thanks.



 
  • March 20, 2020
  • Like
  • 0
I have a hard coded custom link URL for 'My Tasks Today'. As part of the realease update, I had to delete the hard coded url .. and I have to mention the relative path to open the 'My Tasks Today'. After updating the URL, when I click on 'My Tasks Today' on home page .. I am getting error message 'Page Activities does not exist'. Can someone help me on this please ?
  • March 09, 2020
  • Like
  • 0
We have requirement to take survey from customers. But they don't want to send out emails or anything to customers. This suvery will be taken from a office when the customers visit the place. So, I have build survey and calling this survey from Lightning Web Component page in communities Case page. The survey will popup on click of button. Everything looks good so far. Now, I opened a customer case page in community (LWC component behind the scenes), I see the button, I click it, the survey opens and I complete the survey. I can see the results in survey object and analyse the results as well. So far GOOD. No Issues. The problem is when I go to next customer case, when I click on the button, system says .. THE SERVEY IS ALREADY COMPLETED. The reason is survey link is same for all customer .. unable to attach the case no. to the survey link. This is the issue I have. ONLY ONE SURVEY CAN BE DONE IN THE SYSTEM. When i reserached, if you want to send an email .. we use process builders to attach the case no as part of the survey link .. which will be unique. But we don't want to send an email. Any other way to generate unique survey link for each case on click of a button in LWC component ?? Please let me know. 
  • February 16, 2020
  • Like
  • 0
I have to update Case record. So, I have created custom button, which call lightning component, which in turn calls lightning web component. LWC will display the screen perfectly. But when I enter the data and click save. New record is getting created instead of update. How to resolve this issue please ? I followed this link .. https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_update_record . it did not work .. I have doubt.. the apex class ..it's quering one record from case.. we are not even passing any id .. how would it get the right case ????so, I modified the code ..still an issue.  Here is the code 

HTML FILE

<template>
 record-id={recordId} record-type-id={recordTypeId} onsuccess={handleSuccess}> -->
    <lightning-record-edit-form record-id={recordId} object-api-name="Case" columns="1"  mode="edit" density="auto" layout-type="Compact"  onsuccess={handleSuccess} onsubmit ={handleSubmit}>    
        <lightning-messages></lightning-messages>
              
        <!--cpoi-->
        <div class="slds-m-around_medium">
            <div class="slds-section">
                <h3 class="slds-text-heading_large slds-text-align_center">               
                    Testing Case Update          
                </h3>              
            </div>
            <br />
            <div class="slds-grid slds-gutters">
                <div class="slds-col slds-size_1-of-2 csclass">
                    <lightning-input-field field-name='Test_Date__c'></lightning-input-field>
                </div>
            </div>
        <lightning-button variant="brand-outline" type="submit" name="save" label="Update Case" onclick={showHandler} class="slds-align_absolute-center"></lightning-button>
        </div>
    </lightning-record-edit-form>
</template>

Java Script

import { LightningElement, api } from 'lwc';

export default class Test_Case extends LightningElement {
    @api recordId;
    handleSubmit(event) {
     console.log('onsubmit: '+ event.detail.fields);
 
    }
    handleSuccess(event) {
        const updatedRecord = event.detail.id;
       
        console.log('onsuccess: ', updatedRecord);
    }
    
XML File    
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>47.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
        <targetConfigs>
        <targetConfig targets="lightningCommunity__Default">
            <property
                name="recordId"
                type="String"
                label="Record Id"
                description="Automatically bind the page's record id to the component variable"
                default="{!recordId}" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
 
  • January 22, 2020
  • Like
  • 0
If user clicks on the case no. in community page, the details needs to be displayed in community layout. Developing Lightning Web Component for this to display the case details (few fields only). I have html file and xml files ready. When trying to save the .js file, I am getting the below error msg. Can someone help me on this.. new to this. 
I am following the link by @RajVakati  (Displaying Record Fields section)
https://rajvakati.com/lightning-web-components/

The 'title' property does not exist on the component Error

<template>
    <lightning-record-view-form
                record-id={recordId}
                object-api-name="case">
        <div class="slds-grid slds-gutters">
            <div class="slds-col slds-size_1-of-2">
                <lightning-output-field field-name='CaseNumber'></lightning-output-field>
            </div>
            <div class="slds-col slds-size_1-of-2">
                <lightning-output-field field-name='Origin'></lightning-output-field>
            </div>


import { LightningElement ,api} from 'lwc';
 
export default class Recordview extends LightningElement {
    @api recordId ;
}
           
        </div>
    </lightning-record-view-form>
</template>




 
  • January 20, 2020
  • Like
  • 0
We have insatalled Salesforce HealthCloud in our Org. "Healthcare Provider" is standard object. I am admin in the system. I have modify all access to the object. When I open the record, on the page layout, there is no "Edit" button or there is no pencil beside the fields, which means I am not able to edit the record/fields on the page layout. Can someone give me ideas pls ?

Also I am in the process of creating process builder for "Healthcare Provider" object, I have to update couple of fields .. I don't see any field being listed under this object. 

I felt like it's access issue .. but I have required access for the object.. please help me..We are using lightning....thanks.
  • January 05, 2020
  • Like
  • 0
Hi ..

I have 5 different recird types in Account and 4 record types in Contact. At this moment, when I click on new button on account/contact, screen will appear which will ask to select which record type ? After I select, fill the details and account/contact record will be created with the selected record type. Now the question:

Client wants to skip the record type selection screen. So, he want to create a NEW buttons e.g: New Rectype 1, New Rectype 2 etc. So, when user clicks on those buttons, it should create a account/contact record with that type. Please let me know how to do this and how to create buttons ? appreciate if someone can give whole process of doing this ..if anyone had solution earlier for this. 
  • December 19, 2019
  • Like
  • 0


Hello ...
Admin left the company .. and I am trying to disable the user. But the following error is coming. Can you pls help us. Thanks.


Unable to Access Page
The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
 
  • October 08, 2019
  • Like
  • 0
Hi ! 

Let us say we have an Admin. He will be owner of leads, Opportunities, accounts, he will get alerts, his email id used in email templates etc. But he left the company ... now, we need to deactivate him. How do we find what all he is tied to in Salesforce, so, that I can do mass transfer of records, change templates, apex classes if any). How to get this list please ? what is the procudere or quick way transferring the records etc. pls let me know. Thanks. 
  • September 23, 2019
  • Like
  • 0
Pls see the apex class below ..there If cluase in bold .. I have 5 other if caluses with different conditions like create, next, save, sample etc. Somehow I am not able to get code coverage for this. If someone can give this, I will be able to replicate the same test code for other if clauses as well... pls help me with the test coverage code ....thanks.

    @AuraEnabled
    public static List<item> getEndos(string recordId,string bundle){
        Prod_Cre__mdt prodCre=[select Bundle_Draft_Status__c,Bundle_Return_Status__c,Client_Plan_Record_Type__c from Prod_Cre__mdt];
        List<String> status=new List<String>{prodCre.Bundle_Draft_Status__c,prodCre.Bundle_Return_Status__c};
            opportunity oppId=[select accountid,Plan_Due_Date__c from opportunity where id=:recordId];
        List<Endo_Map__c> EndoMap=[SELECT Id,New_Endo__c, New_Endo_Code__c, New_Endo_Name__c,Old_Endo__c FROM Endo_Map__c WHERE Replacement_Date__c <=:oppId.Plan_Due_Date__c];
        List<item>items =new List<item>();
        if(bundle=='Create'){
            List<Product_Endo__c> prodEndos=[SELECT Endo_Code__c,Endo__c,Endo_Name__c,Id,Pilot__c,Product__c FROM Product_Endo__c WHERE Product__c IN (SELECT Plan__c FROM Client_Plan__c where Account__c=:oppid.Accountid and RecordType.DeveloperName =:prodCre.Client_Plan_Record_Type__c)];
            for(Product_Endo__c prod: prodEndos){
                if(EndoMap.size()>0){
                    for(Endo_Map__c endMap:EndoMap){
                        if(prod.Endo__c==endMap.Old_Endo__c){
                            item oppitem = new item(prod.Endo_Name__c, String.valueOf(prod.Id), prod.Endo_Code__c, prod.Pilot__c, true);
                            items.add(oppitem);
                        }else{
                            item oppitem = new item(prod.Endo_Name__c, String.valueOf(prod.Id), prod.Endo_Code__c, prod.Pilot__c, null);
                            items.add(oppitem);
                        }
                    }
                }else{
                    item oppitem = new item(prod.Endo_Name__c, String.valueOf(prod.Id), prod.Endo_Code__c, prod.Pilot__c, null);
                    items.add(oppitem);
                } 
            }
        }
        return items;

    }
  • August 19, 2019
  • Like
  • 0
I have wierd client requirement. The client requirement has 10 screens to develop in combination of Flows and Lightning Components. Here is the example of one screen.

Eg Screen 1

1. It has display fields. (data comes from Opportunity record)
2. Also pick list values. (Data comes from Accont Record)

Eg. Screen 2

1. Based on the picklist values selected from Screen 1, I have to extract a data from custom object using SOQL query and display list of rows of data for user to select multiple records and add it.
Check Box (for selecting the record), Name, Loan Type, etc
Note: User can select multiple records here.

Now the client is asking me to design combination of Flows and Lightning components. He is asking in one screen #1/2 etc (any given screen).. couple of fields will be defined in Flow and rest of the fields in lightning component. 

eg. Screen 1 - All the opportunity fields will be coming from Flow. Account fields should come from Lightning component.

Is this possible ?? How can I get it like that .. and how do I pass the data back and forth from flow to LC (lightning componet) .. 

Screen 2 - I have SOQL query here .. How can have some fields in flow and some are in LC ? 

Can someone give an example if you have done it prior ? Any posts that will be do it... simply I said, it's not possible. We will do everything in LC only (all screens). 
  • July 30, 2019
  • Like
  • 0
Our business is using Trigger factory to write triggers. Here is the link for this concept # https://developer.secure.force.com/cookbook/recipe/trigger-pattern-for-tidy-streamlined-bulkified-triggers

I have handler which has all the business logic in the private class. For some reason I am not able to get the trigger.old and trigger.new variables into the handler. 

Can someone please guide me on this. Thanks. 
  • July 24, 2019
  • Like
  • 0
I am generating random number of length 9 digits .. sometimes, the leading zero is dropped and I am getting less than 9 digits sometimes... so, I need to check the number length in apex ..if it;s less than 9 numbers I want to generate another one. How to get the length ?
  • May 17, 2019
  • Like
  • 0
I have VF page. I am using this VF page in lightining component in iFrame. VF page is using the standard controller "Account". The page has buttons. I want to change the color of the button - background and button color as well. The buttons I have are "Save" and "Cancel" both of them are standard buttons. Pls let me know.... thanks. 
  • April 11, 2019
  • Like
  • 0
Hello! I have outbound platform event. When there is record created/edited in Salesforce .. I have trigger which will write the data into the Platform event. Somehow 3rd party is not getting the data. How do I see whether the data from Salesforce is going out or not ..  I am unable to see the data in platform event in workbench .. using the following query.. getting zero records...

/services/data/v44.0/query?q=SELECT+Id+,+EventType+,+LogDate+,+LogFileLength+,+LogFile+FROM+EventLogFile+WHERE+EventType+=+'ReportExport'
  • April 11, 2019
  • Like
  • 0
I have a picklist field valid values are A, B or C. I am using this field in lightning component. When the screen presented, the default value should be "None". If user is not chaning this picklist field to valid value - A, B or C, system throw an error message it's required field and valid values are A, B or C. How to acheive this functionality ?

Pls note that "None" is not a valid picklist value... but the field should be set to "None" when the screen comes up. 
  • April 10, 2019
  • Like
  • 0
I have 18 char id for the user. But I want to get the User name using the 18 char salesforce user id in Apex class. I tried to use the SOQL query to get the user name... it's exceeding the governer limits.. any other way getting the user name plase .. thanks. 
  • March 17, 2019
  • Like
  • 0
I have a lightning component and controller right now. There is a bug which I m working on ...need to fix pretty soon.. pls help.

I have drop down which has list of related contacts for the account. when user selects one of the contact, the below page should refresh with all the details from that contact record. There are log of fields on the page. How do I acheive this pls ? Pleae give me the code.. thanks. 
  • March 16, 2019
  • Like
  • 0
I have a trigger which will insert the record into custom object. This trigger is on event object. So, whenever there is a record in the event object, this trigger will fire. In the trigger logic, I am inserting the record into a custom object. The following test calss I have.. when I run the test, the trigger is getting 0% code coverage... please help URGENT.

@isTest
public class TESTEventTrigger_TEST {
    static testMethod void testMethod1()
    {
        test.startTest();
        try
        {
            for(Integer i=0 ;i <200;i++)
        {
            Integer upload = 0;
            if (upload == 0) {
                TEST_Record__c p = new TEST_Record__c(
                                                             First_Name__c = 'acct.First   Name' +i,
                                                             Last_Name__c = 'acct.Last   Name',
                                                    

                );
                insert p;
                upload = 1;
                Case cse = New Case();
                cse.Name = 'name only';
                insert cse;
            }
            }
        }
        Catch(Exception ee)
        {
        }
        test.stopTest();

    }
}
 
  • December 18, 2018
  • Like
  • 0
One of my Users unable to update their own Task fields and while updating the data, it shows the error like "insufficient access rights on object id". As an administrator, i dont want to give "Modify All' access to my user. if i gave "Modify all" access to user, My user able to update their own Task information.
  • May 24, 2020
  • Like
  • 0
I have a hard coded custom link URL for 'My Tasks Today'. As part of the realease update, I had to delete the hard coded url .. and I have to mention the relative path to open the 'My Tasks Today'. After updating the URL, when I click on 'My Tasks Today' on home page .. I am getting error message 'Page Activities does not exist'. Can someone help me on this please ?
  • March 09, 2020
  • Like
  • 0
If user clicks on the case no. in community page, the details needs to be displayed in community layout. Developing Lightning Web Component for this to display the case details (few fields only). I have html file and xml files ready. When trying to save the .js file, I am getting the below error msg. Can someone help me on this.. new to this. 
I am following the link by @RajVakati  (Displaying Record Fields section)
https://rajvakati.com/lightning-web-components/

The 'title' property does not exist on the component Error

<template>
    <lightning-record-view-form
                record-id={recordId}
                object-api-name="case">
        <div class="slds-grid slds-gutters">
            <div class="slds-col slds-size_1-of-2">
                <lightning-output-field field-name='CaseNumber'></lightning-output-field>
            </div>
            <div class="slds-col slds-size_1-of-2">
                <lightning-output-field field-name='Origin'></lightning-output-field>
            </div>


import { LightningElement ,api} from 'lwc';
 
export default class Recordview extends LightningElement {
    @api recordId ;
}
           
        </div>
    </lightning-record-view-form>
</template>




 
  • January 20, 2020
  • Like
  • 0
We have insatalled Salesforce HealthCloud in our Org. "Healthcare Provider" is standard object. I am admin in the system. I have modify all access to the object. When I open the record, on the page layout, there is no "Edit" button or there is no pencil beside the fields, which means I am not able to edit the record/fields on the page layout. Can someone give me ideas pls ?

Also I am in the process of creating process builder for "Healthcare Provider" object, I have to update couple of fields .. I don't see any field being listed under this object. 

I felt like it's access issue .. but I have required access for the object.. please help me..We are using lightning....thanks.
  • January 05, 2020
  • Like
  • 0
I am generating random number of length 9 digits .. sometimes, the leading zero is dropped and I am getting less than 9 digits sometimes... so, I need to check the number length in apex ..if it;s less than 9 numbers I want to generate another one. How to get the length ?
  • May 17, 2019
  • Like
  • 0
I have VF page. I am using this VF page in lightining component in iFrame. VF page is using the standard controller "Account". The page has buttons. I want to change the color of the button - background and button color as well. The buttons I have are "Save" and "Cancel" both of them are standard buttons. Pls let me know.... thanks. 
  • April 11, 2019
  • Like
  • 0
Hello! I have outbound platform event. When there is record created/edited in Salesforce .. I have trigger which will write the data into the Platform event. Somehow 3rd party is not getting the data. How do I see whether the data from Salesforce is going out or not ..  I am unable to see the data in platform event in workbench .. using the following query.. getting zero records...

/services/data/v44.0/query?q=SELECT+Id+,+EventType+,+LogDate+,+LogFileLength+,+LogFile+FROM+EventLogFile+WHERE+EventType+=+'ReportExport'
  • April 11, 2019
  • Like
  • 0
I have 18 char id for the user. But I want to get the User name using the 18 char salesforce user id in Apex class. I tried to use the SOQL query to get the user name... it's exceeding the governer limits.. any other way getting the user name plase .. thanks. 
  • March 17, 2019
  • Like
  • 0
I am trying to integrate Salesforce with 3rd party system to create new accounts. I know within SF, there are duplicate rules and matching rules exist. Before I create new accounts, I want to run thru the existing duplicate rules on Account (Org has Person Accounts Enabled). if there is any duplicate I want to dump those accounts into temporary object for further review... if there is no duplicate, then I want to create new account. Let me know how this can be achieved pls ?

If I can't use dumplicate/matching rules ...then any SOQL/SOSL query example where I can search in the Org to find out any duplicates or not.. 
I am going to verify First Name, Last Name, ZIP/postal code fields for duplicates. 
  • November 30, 2018
  • Like
  • 0
I have created a new auto number field in Log a call. But I am unable to add this field to the page layout... I want to see whether it's working or not. If everything is good, then I want to hide this field from page layout. let me know how to add this field to the layout. 
  • November 21, 2018
  • Like
  • 0
Hi ... I have a requirement to get a report from 2 objects. When I looked at the schema diagram for these 2 objects, they are not related. One of the object is Account and other one is custom object. But report requires, details from custom object and related account details (like name, id etc). how can I acheive this please ?
  • October 26, 2018
  • Like
  • 0
I have component A which is calling component B. I have to pass the variable to child component. For some reason child component is not getting the variable. Can someone help with this.

Comp A - Component
<c:Presample ParentId="{!v.samId}"/>    ---> Presample (Comp B) is another lightning component which inturn calls url by passing the samId..which has apex class, which takes the samId for further processing. When I debug, the child component is not getting the variable SamId. Also I noticed, apex class is not @AuraEnabled. So, I had included in the upper class... still same issue. Do I have to include @AuraMethod for all the methods in the class ? 

Also why the child component is not getting the variable ? I am following the sample ref # https://developer.salesforce.com/blogs/developer-relations/2017/04/lightning-inter-component-communication-patterns.html

Comp B - Controller

 var url = '/apex/JSample?ParentId=' + SamId;  (Note: ParentId variable is defined in CompB component. SamId is defined in Comp A component)
  • October 18, 2018
  • Like
  • 0
I have defined a custom phone field (Type is Phone). When user enters 1234567890, it should be validated - Numeric, Should be 10 digits only, if the validation is ok, when we press enter, it should be formatted as (123) 456-7890. How this can be done please ? 

 
  • October 12, 2018
  • Like
  • 0
I have two custom objects [access.log & trans.log] who receive daily updates [New Records] from an external system. After 31 days we don't need them anymore and we would like to delete them. Both objects have a date field on the record 'Log_date__c'.

I know that you can make a job that deletes these records on a daily basis.

My question;

- How do I write a code that deletes the right records? (Log_date__c older than 31 days)
- How/where do I put in SFDC? (Apex Class or Trigger! - Both!)

Are there any who can help me progress. In which case it will be my first code in SFDC.