• Nitin Shyamnani
  • NEWBIE
  • 80 Points
  • Member since 2017
  • Senior Tech Lead / Salesforce Developer

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 15
    Replies
I have Created one custom setting with email digest feature which sends a mail to user through batch classes as per record value stored.

For Ex- If Internal user stores as Email Digest Daily then he would get mail daily, and if he selects as weekly then he get mail weekly for record update, which is working for perfect for Internal user.

I am mangaging(storing) custom setting data for user from apex class.
User-added image
But this data is stored at org level, means if internal user saves email digest value as daily then this is applied for every user.

I want to change update this custom setting data at user level by which i can set the schedular as per user want.

If Suppose any uesr wants mail to daily then he got mail daily record update and if any one wants weekly then it got.
Create a new link on the contact row to delete the contact from the account. On clicking the link, the contact should be deleted this time using VisualForce Remoting. On successful deletion, an alert should be displayed on the page stating “The contact has been deleted”.
  • August 04, 2018
  • Like
  • 1
User 1 and User 2 with same Profile P1,Both have access to Amount on Account.To restrict access to Amount field for User 2
Hi all
I would like to call a visual page(AddCertifications) from another visual page(ProfileUpadate) in button click. But nothing is coming when i click the button.This is my code
PageReference p = new PageReference('/apex/AddCertifications?id='+cid);
p.setRedirect(true);
return p;

The requirement is when i click the upload button in ProfileUpadate page , the AddCertifications page will open for uploading file.Both the pages extends different controllor. How to achieve this one? 
I have Created one custom setting with email digest feature which sends a mail to user through batch classes as per record value stored.

For Ex- If Internal user stores as Email Digest Daily then he would get mail daily, and if he selects as weekly then he get mail weekly for record update, which is working for perfect for Internal user.

I am mangaging(storing) custom setting data for user from apex class.
User-added image
But this data is stored at org level, means if internal user saves email digest value as daily then this is applied for every user.

I want to change update this custom setting data at user level by which i can set the schedular as per user want.

If Suppose any uesr wants mail to daily then he got mail daily record update and if any one wants weekly then it got.
Hi,
I am building a method in apex that generates url with default field values to pre populate fiels in opportunity object. I am trying to pre populate 6 different fiels, out of which two of them are Category (Controlling field) and Sub Category(dependent on Category field selection) are pick list. 

Value in sub category loads and enable only after user select value in Category field. When I am trying to pass default field values using url hacking Category picklist field get populated correctly, where as Sub category pick list field get enabled but does not pre populate

Any thougths, how I can achieve this ?
Hi,
     Please look at the following piece of code
   
<aura:attribute name="NoofHoursStudy" type=" String[]" default="Less than 1 hour, In between 1 to 4 hours, In between 4 to 8 hours, More than 8 hours"/>

<lightning:select label="How many hours do you study in a day?" name="hrsStudy">

<aura:iteration items="{!v.NoofHoursStudy}" var="hrs" >
<option value="{!hrs}" text="{!hrs}">

</aura:iteration>
</lightning:select>

Q) My Question is what exactly the bolded part of piece of code doing? ? Without that i receive an error. Can somebody please tell me what value attribute is doing ?? also what text attribute is doing, and what does exclamation mark in text attribute mean?? also what does exclamation mark for the value of the value attribute mean and what value attribute is doing??
Hi,

We are using FLG's FlowXO component to push leads into SalesForce.

However, when we do this, we get the following error:

Unable to create/update fields: RR1__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

Where do I make this change in SalesForce?
Hi,

We have 2 objects named seller and invoice. Let's make a month into 2 parts as 1 to 15 and 16 to 31. The seller and invoice have a lookup relationship. If we entering data on the seller object from date 1 to 15 then the invoice date must only be before 1 to 15 that is before month 16 to 31. It should not enter future dates. Or else if we entering data on the seller object from date 16 to 31 then the invoice date must be before 16 to 31 which is the same month 1 to 15. That is a condition so kindly help me in developing validation rule for this. As I was new to salesforce kindly help by writing validation rule for me.

Thanks and Regards,
Virat

1. Which governor limit applies to all the code in an Apex transaction?

A. Elapsed SOQL query time
B. Number of classes called
C. Number of new records created
D. Elapsed CPU time

2. A developer wants multiple test classes to use the same set of test data?
How should the developer create the test data ?

A.Reference a test utility class in each test class
B. Create a test setup method for each test class
C. Define variables for test records in each test class
D. Use SeeAllData = true annotation in each test class

3. A developer needs to apply the look and feel of lightning experience to a number of applications built using a custom third-party JavaScript framework and rendered in visualforce pages.
Which option can achieves this? 

A. Set the attribute enablelightning to "true" in the definition
B. Replace the third-party JavaScript library with native visualforce tags
C. Configure the user interface options in the setup menu to enable legacy mode for visualforce
D. Incorporate salesforce lightning design system CSS stylesheets into the JavaScript applications

4. What is considered the primary purpose for creating apex tests?
A. To guarantee at least 50% of code is covered by unit tests before it is deployed
B. To ensure every usecase of the application is covered by a test
C. To confirm every trigger is executed at leat once.
D. To confirm all classes and triggers compile successfully

5. Which declarative method helps to ensure quality data?

A. Workflow alerts
B. Page layouts
C. Lookup filters
D. Validation rules
E. Exception handling

6. A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?
A. By using ApexMessage.Message() to display an error message after the number of DML statements is excel
B. By using Messaging.SendEmail() to conthtinue the transaction and send an alert to the user after the number DML statements is exceeded.
C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded. 

-- Which solution is correct A or D ?

7. A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.
Which statement is unnecessary inside the unit test for the custom controller?
a.    Test.setCurrentPage(pageRef);
b.    String nextPage = controller.save().getUrl();
c.    ApexPages.currentPage().getParameters().put(‘input’, ‘testValue’);
d.    Public ExtendedController(ApexPages.StandardController cntrl) {}
hi, my code is working, fine. to check duplicates used contains method , 
if  exists iam getting true value, but i need to get the false value also if not in list , how can  i solve this issue ..

User-added image

need to add : false ,for the 'b' as it wont exists
Apex class:
public class test3{
 public list<string>listSelectedNames{get;set;}
 public list<Wrapperclass>wraplist{get;set;}
 public list<boolean> Selectedbooleanlist{get;set;}
 public list<string>duplicatevalues{get;set;}
  
  public test3(){
 listSelectedNames = new list<string>();
 Selectedbooleanlist= new list<boolean>();
 duplicatevalues= new list<string>{'a','c'}; //duplicated to filter
 wraplist = new list<Wrapperclass>();
   Wrapperclass   wf = new Wrapperclass();
                  wf.selected=false;
                  wf.name ='a';
                 
    Wrapperclass   wf1 = new Wrapperclass();
                  wf1.selected=false;
                  wf1.name ='b';
                                  
   Wrapperclass   wf2 = new Wrapperclass();
                  wf2.selected=false;
                  wf2.name ='c';
                
          wraplist.add(wf);
          wraplist.add(wf1);
           wraplist.add(wf2);
        
 }
 
 
   public void duplicatecheck(){
   listSelectedNames.clear();
   Selectedbooleanlist.clear();
    for(wrapperclass wrap: wraplist){
      if(wrap.selected == true){
    listSelectedNames.add(wrap.name);
        }  
      }
     
     //to check duplicate
     for(String s1 : duplicatevalues){
      if(listSelectedNames.contains(s1)){
        boolean selected =  true;
        Selectedbooleanlist.add(selected);
         
   
      //add logic 
       }
    } 
        
        }
 //wrapper classs
    public class Wrapperclass{
       public boolean selected{get;set;}
       public string Name{get;set;}
    }
  
  
}


Visualforce Page:

 
<apex:page controller="test3">
   <apex:form >
   <apex:pageBlock >
      <apex:pageblockTable value="{!wraplist}"  var="a">
       <apex:column ><apex:inputCheckbox value="{!a.selected}"/>{!a.name}</apex:column>
       </apex:pageblockTable>
    <apex:commandButton value="OrderSelected"  reRender="one,two" action="{!duplicatecheck}"/>
      <apex:outputLabel id="one">{!listSelectedNames}</apex:outputLabel>
       <apex:outputLabel id="two">{!Selectedbooleanlist}</apex:outputLabel>
    </apex:pageBlock>
   </apex:form>
</apex:page>
//as it contains iam getting true, but to get false also if it dnt contains in the list of boolean
please help in this issue iam stucked
advance thanks
soumya yerava .
 
Create a new link on the contact row to delete the contact from the account. On clicking the link, the contact should be deleted this time using VisualForce Remoting. On successful deletion, an alert should be displayed on the page stating “The contact has been deleted”.
  • August 04, 2018
  • Like
  • 1

Hello everyone,

I need to solve this:
I'm using a fieldset on a visualforce page and I need to know if some field is read-only for set some styleClass. I know that we have some properties from fields, but I don't know exactly which property to use for this. 

For example:

<apex:outputPanel rendered="{!field.type == 'reference'}">

Here I'm using the property 'type' to set some styleClass in the inputfield inside of the outputpanel, what I need know now is what property I have to use to know if the field is read-only.. for example {!field.readOnly} .. but we know that doesn't exists.

Can someone help me with this?

Hi,

We have 2 objects named seller and invoice. Let's make a month into 2 parts as 1 to 15 and 16 to 31. The seller and invoice have a lookup relationship. If we entering data on the seller object from date 1 to 15 then the invoice date must only be before 1 to 15 that is before month 16 to 31. It should not enter future dates. Or else if we entering data on the seller object from date 16 to 31 then the invoice date must be before 16 to 31 which is the same month 1 to 15. That is a condition so kindly help me in developing validation rule for this. As I was new to salesforce kindly help by writing validation rule for me.

Thanks and Regards,
Virat