• Jaanu
  • NEWBIE
  • 170 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 67
    Questions
  • 87
    Replies
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
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 establish 3rd party integrations with Salesforce. I have created new platform event object within Salesforce. So, the 3rd party system writes the transactions into this new platform event table. As of now, there will be accounts and cases written into this platform event object. So, I need to process whenever there is a payload in this event. I need to check whether the account already exist within the system or not by matching 5 fields (first name, last name, dob, gender etc), if none them are matching, then we need to create an account and case. If some of the fields are matching then, I will have to dump in the new object (where reps, will review manually before they create accounts etc). How to do this and any code will be helpful.
  • November 21, 2018
  • Like
  • 0
I have the following class ...When I am trying to schedule this apex class ... not able to find it ... thinking that it's bec there is zero test coverage .. am i correct on that ? If so, how to write test class to get test coverage 100%.. 

When I tried to schedule the same class in DEV, I was able to schedule it ... I did not have any test class also ... thanks.

global class DeleteRecords implements Schedulable{ global void execute(SchedulableContext SC) { List<Custom_Object__c> customObj = [select Id FROM Custom_Object__c WHERE createddate = LAST_N_DAYS:30]; if(!customObj.isEmpty()) delete customObj; } }

 
  • November 09, 2018
  • Like
  • 0
I have created a report from two custom ojects. I have added all the required fields to the report. Now I need to find the difference in two date fields. So, I clicked on the formula, but unable to find these fields to calculate the difference in two dates. Not sure why ? Both these fields are on this report. Still I can't find both these fields while adding the formula. Any reason for this please ? I just need to calculate the working days between these 2 dates - D1 and D2. Please let me know.
  • November 05, 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
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 added a custom button in custom object (Cust__c) page layout. on click of button, I want to update the check box, which is not working. I have the following code in custom button javascript logic... pls help/

Check__c - Check box field
CheckPE__c - Check box field
Code is below

if(Check__c = true){ 
    CheckPE__c = true; 
    alert('Successfull!')
}
else{
    alert("validate");
}
  • September 27, 2018
  • Like
  • 0
I have 2 lightning components. Both these components deal with account object. In the 1st component, I enter few fields and then save it. All the fields are getting saved properly. I am passing the recordId from 1st component to 2nd component. In the second component, I need to load this record and enter few more fields and then save it. It's not saving the fields... Pls let me know how to load the account in the 2nd component and save these fields. Thanks.
  • September 18, 2018
  • Like
  • 0
I have 5 lightning component and calls one after another components in sequence. The problem is, when it navigates to another component, new tab is getting opened everytime... it's too many tabs to close etc. what is best way to open in the tab for all the components ? or close the current tab and open new tab and focus that tab. Can someone give the code for the same please ??
  • September 10, 2018
  • Like
  • 0
I am unable to save the record in LDS. can you pls help me.. Here is the component and controller. 
Component
         <lightning:recordEditForm recordId="{!v.recordId}" objectApiName="Prescription__c" >

             <lightning:recordViewForm recordId="{!v.pacctId}" objectApiName="Account"> --> This is coming from Acct Object
                   <lightning:outputField fieldName="FirstName" />
                   <lightning:outputField fieldName="LastName" />
            </lightning:recordViewForm> 

           <lightning:recordViewForm recordId="{!v.pacctId}" objectApiName="Pre__c">  --> This is coming from different Object
                   <lightning:outputField fieldName="P_First_Name__c" />
                   <lightning:outputField fieldName="P_Last_Name__c" />        
            </lightning:recordViewForm>               
             
             <div class="slds-p-horizontal--small">
            <lightning:inputField fieldName="Name" />  --> These fields are input fields from 3rd Object which needs to be saved ultimately.
                <lightning:input fieldName="D__c" />   
                <lightning:inputField fieldName="R__c" />
                <lightning:inputField fieldName="O__c" />                     
             </div>
                <br/>

                <lightning:layoutItem padding="around-small">
                    <lightning:button class="slds-button slds-button--brand" label="Next" onclick="{!c.handleSuccess}" variant="brand" />
                </lightning:layoutItem>

controller
     handleSuccess : function(component, event, helper) {
        alert('I am in the Prescription success function # ' + component.get("v.pacctId"));
        component.set("v.simpleInsertP.Pa__c", component.get("v.pacctId"));
        component.set('v.simpleInsertPr.H_A__c', component.get("v.hcpId")); 
        alert(' I am here at 33333333 ....');  - > This alert is coming... after that nothing is happening... it's not even going to IF clause.
        component.find("recordHandler").saveRecord(function(saveResult) {
        if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
            alert(' I am here at 2222222 ....');
            var toastEvent = $A.get("e.force:showToast");
            toastEvent.setParams({
                "title": "Success!",
                "message": "Prescription Record created Successfully!",
                "type": "success"
            });
  • August 28, 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.

Hi,

 

We have a custom button on a custom object. We click on this button and the javascript performs the actions based on a field in this custom object. The field is a checkbox field and it has default value as unchecked. Like this - 

-----------------------------------

If field A = 0 (unchecked)

     perform AAA

else

     perform BBB

-----------------------------------

But we want to update the field value (checkbox should become checked) when if statement encounters the value = 0

 

-----------------------------------

If field A = 0 (unchecked)

     update A = 1

     perform AAA

else

     perform BBB

-----------------------------------

How can we achieve this?

Thanks in advance!

 

Best regards

  • November 20, 2013
  • Like
  • 0