• rushi
  • NEWBIE
  • 115 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 10
    Replies
Hai,
I have one requirment.
I created one vf page which display the records of the object along with checkbox.When i check the checkbox and click on the getrecord button it display corresponding record detail page.
here the code
vf page
-----------------------
<apex:page controller="EmployeeInformationcontroller" >
   <apex:form >
      <apex:pageBlock >
          <apex:pageBlockTable value="{!emplist}" var="e">
           <apex:column >
             <apex:inputCheckbox value="{!e.Selected__c}"/>
             </apex:column> 
          <apex:column value="{!e.First_Name__c}"/>
  <apex:column value="{!e.Middle_Name__c}"/>
  <apex:column value="{!e.Last_Name__c}"/>
  <apex:column value="{!e.Date_of_Birth__c}"/>
  <apex:column value="{!e.Father_Husband_Name__c}"/>
  <apex:column value="{!e.Marital_Status__c}"/>
  </apex:pageBlockTable>
     <apex:commandButton value="Get Record" action="{!Getrecord}"/>
      </apex:pageBlock>
   </apex:form>
</apex:page>
controller
---------------------------
public class EmployeeInformationcontroller 
{
    public list<Employee_Information__c> emplist{get;set;}
    public boolean selected{get;set;}
    public Id selectedid{get;set;}
    public EmployeeInformationcontroller()
    {
          //selectedid =ctrl.getRecord().Id; 
         selected = false;
         emplist = [select First_Name__c,Middle_Name__c,Last_Name__c,Date_of_Birth__c,Father_Husband_Name__c,Selected__c,Marital_Status__c from Employee_Information__c];
    
    }
    
    public PageReference Getrecord() 
    { 
        list<Employee_Information__c> emp1 = new list<Employee_Information__c>();
        Employee_Information__c ei = new Employee_Information__c();
        for(Employee_Information__c et:emplist)
        {
           
        }
        return null;
    }

}
please any one help me to slove this
 
before we insert a new record in the customer object calculate the tax field value based on salary field value and then insert??

How i reach the right code ..??
Hello All,

I have created a LWC component and part of that created new dates fields. In Js, I wrote the logic that when the selected date is below today's date then assign it to today's date and by default date should be today's date.

Issue: when the selected date is less than today's date then JS logic is executing and updating it to today's date but in UI it's not reflecting.
Example: When the page is loaded dafult date will be 4/27/2022 and when I select the date 4/20/2022, UI will display 4/20/2022 value and JS will hold the 4/27/2022 value.

<lightning-input type="date" data-id="date1" variant="label-hidden" placeholder="Enter Start Date.." value={date1} onchange={handleDateChange} ></lightning-input>

handleDateChange(event) {
  let val = event.target.value;
  const changedDate = val;
  if(changedDate < this.today) 
     this.date1 = this.today;
}

 
  • April 27, 2022
  • Like
  • 0

Hello,
I am trying to create a LWC component to be used in lighting app page and community page.
Page contains lighting button with brand variant and display color dynamically if community    Red
large flexi page.   Green
medium.    Yellow 
small.   Blue
 

I updated xml file targets to lighting app page and community page.
created html file to use flexipageregionwidth and based on the region size display related colors using CSS file. 

I am able to apply button border colors but unable to fill the button.
please anyone could answer this why fill is not working for lighting button.
Thanks in advance!

  • March 23, 2021
  • Like
  • 0
I am trying to convert the java script button to lightning and creating a VF page and controller.
The list button on the Model_C object will be on the Contact page layout related list. When user clicks the button it checks the parent object Terms_of_use__C check box, if it's true then we will open the URL in new window otherwise give some alert message.

In classic, java script button is working fine but this VF page is not displaying anything neither the new URL nor alert message.
VF page:

<apex:page standardController="Model__c" recordSetVar="Models" lightningStylesheets="true" extensions="ModelController"> <apex:includeScript value="/soap/ajax/43.0/connection.js"/> <apex:includeScript value="/soap/ajax/43.0/apex.js"/>
<script type="text/javascript">
sforce.connection.sessionId = '{!$Api.Session_ID}';
</script>
<script type = "text/javascript">
function test123(terms){ var MyUrl = '{!JSENCODE($Label.Survey_URL)}';
console.log(terms); if(terms == 1){ window.open(MyUrl,"_blank"); } else { alert("The Contact has not agreed to the Terms .") } } </script> <apex:form >
<apex:actionFunction name="test12" action="{!termsE}" oncomplete="test123('{!terms}');"/> </apex:form>
</apex:page>
Apex class:
public class ModelController{

    public ModelController(ApexPages.StandardSetController controller) {

    }

    public List<Model__c> Models {get; set;}
    //pubmic Contact contact;
    public Boolean terms {get; set;}
    
     public ApexPages.StandardSetController con {
        get {
            if(con == null) {
                con = new ApexPages.StandardSetController(Database.getQueryLocator(
        [SELECT Id, Name, contact__r.Terms_of_Use__c FROM Model__c where contact__r.Terms_of_Use__c = true]));
        }
            return con;
        }
        set;
    }

    // Initialize setCon and return a list of records
    public List<Model__c> getModels() {
        return (List<Model__c>) con.getRecords();
    }
    
    public Boolean termsE(){
      //Boolean terms= false;
      terms = con.getRecords().size() > 0 ? true : false;
      return terms;
    }
}
Javascript button:
{!REQUIRESCRIPT("/soap/ajax/40.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/40.0/apex.js")}


var MyUrl = '{!JSENCODE($Label.Survey_URL)}'
if({!Contact.Terms_of_Use_c} == 1){
window.open(MyUrl,"_blank");
} else {
alert("The Contact has not agreed to the Terms.")
}
 
  • September 24, 2019
  • Like
  • 0
Hello,

I created an approval process to send the record for approval based on some cretain conditions.
I created two email alets for final approval and rejection actions. All is working well but the record owner receving duplicate same email alerts once finance team approves/rejects the request. The issue started recently before it used to work perfectly fine.
I pulled a debug log file and observed that email laert is firing twice before and after the field update.
Any ideas why it's happening?
User-added image
  • May 09, 2017
  • Like
  • 1
Hello All,

I am working on a lead conversion and receiving the opportunity validation error because of the partner check box is unchecked.
But in the lead after update trigger we are assigning this value to be checked to pass the opportunity VR. So I am wondering does anybody knows the lead conversion order of triggers and validation rules execution including the lead,account,contact and opportunity objects.
If the validation rules will firebefore executing the all after triggers then why it's not working in other validations?

Thanks for all the help.
  • April 13, 2017
  • Like
  • 0
Hello,

We are tracking the field name called "hours submitted" and this feld is read-only to the user(who is creating the record).
After creating the record the hours value is populated and no tracking history is avilable.
I looked at the code and all workflow rules nothing is updating the value.

Is there any chance to miss the field history traking?
Thanks.....
  • October 19, 2016
  • Like
  • 0
How Can I give the access to the UAT Sandbox for the non-admin users?
  • September 12, 2016
  • Like
  • 0
Hello,

Anyone can explain me about the  VF page tag: Action roller?
I know little bit about this tag but what is the main use in real time scenarios.


Thanks.....

 
  • April 18, 2016
  • Like
  • 0
What is the use of Fore.com Migration tool  plugin in Force.com IDE?
  • March 19, 2016
  • Like
  • 0
Hello,
what is the exact difference between contact and user?
Suppose we have banking company they are using the salesforce platform.If I have an account with that company then what values will be stored in the standard objects of Accounts and Contacts?

 
  • March 10, 2016
  • Like
  • 0
Hello everyone,

Can anybody explain me, how we will use ajax request actions
actionfunction, actionPoller,actionsupport,actionstatus and actionregion on standard objects with examples

​Thanks in advance................
  • March 09, 2016
  • Like
  • 0
Hello everyone,

When I am working with workflows, One question is roaming through my mind  i.e why don't we have time-dependent workflows actions when the evaluation criteria are "every time record is created and edited"


Thanks..........
  • February 03, 2016
  • Like
  • 1
Do we have any open source projects on Force.com platform like Java technology?
And if so, where I can find those???????

 
  • January 27, 2016
  • Like
  • 0
I got the Dev-401 certification in 2015 and now it is expired.
If I want to get the Dev-501, do I need to again write the dev-401 OR can I directly go through the Dev-501 process?
  • January 06, 2016
  • Like
  • 0
I downloaded Data.com assessment from Appexchange
I see some custom objects and relation between them. Can anybody explain in detail how to use this app for data cleansing?

Thanks in advance.......
Rushi
  • September 28, 2015
  • Like
  • 0
Hello,

 I have a requirement to display related list on parent record based on check box on detail object
In detail 
  I created 2 custom objs one is master and another is detail
  Detail obj has check box field holds true or false values
 if it is true detail record displays on the parent record as a related l list otherwise not

How can I acheive this?????

Thanks,
Rushi
  • August 26, 2015
  • Like
  • 0
Hello,
  Can anybody tell me the diffrence ​between execute and executebatch in BatchApex?

Thanks in advance
  • August 10, 2015
  • Like
  • 0
Can anybody tell me the diffrence between apex:Datatable and apex:datalist?
  • August 04, 2015
  • Like
  • 0
Hello,

 I have to create one trigger on opportunityLineItem
I can't see opportunityLineItem  in setup/customize
how can I create trigger??????

i can't see pricebook entries tab also
how can i create record for pricebook entries

 
  • July 08, 2015
  • Like
  • 0
Hello,

 Account object has   territory field and affiliation child objects with lookup relation
how to write a trigger on territory field  object
i.e record has to be  inserted in  territory field  object when the lookup account has affiliation

could  you please give me a snapshot of code

Thanks in advance..
  • July 07, 2015
  • Like
  • 0
Hello,

I created an approval process to send the record for approval based on some cretain conditions.
I created two email alets for final approval and rejection actions. All is working well but the record owner receving duplicate same email alerts once finance team approves/rejects the request. The issue started recently before it used to work perfectly fine.
I pulled a debug log file and observed that email laert is firing twice before and after the field update.
Any ideas why it's happening?
User-added image
  • May 09, 2017
  • Like
  • 1
Hello everyone,

When I am working with workflows, One question is roaming through my mind  i.e why don't we have time-dependent workflows actions when the evaluation criteria are "every time record is created and edited"


Thanks..........
  • February 03, 2016
  • Like
  • 1

Hi,

I have created a lightning button called "Raise a concern" but I would like to change the color of the text and the Icon, but when using Style in the component style, I am unale to change the color.

Here is the bit of code 
</aura:if>
        <aura:if isTrue="{!v.currentCaseRecordType=='Incident'}"> 
             
            <lightning:button variant="destructive"
                              label="Raise a Concern" class="concern"
                              iconName="utility:priority"
                              iconPosition="left"
                              title="Raise a Concern"
                              onclick="{! c.concernModalOpen }" 
                              disabled="{!if(v.currentCaseCaseConcern>0,'true','false')}"/>
        </aura:if>      

Could someone Help?
ThanksUser-added image

 

Hello,

I created an approval process to send the record for approval based on some cretain conditions.
I created two email alets for final approval and rejection actions. All is working well but the record owner receving duplicate same email alerts once finance team approves/rejects the request. The issue started recently before it used to work perfectly fine.
I pulled a debug log file and observed that email laert is firing twice before and after the field update.
Any ideas why it's happening?
User-added image
  • May 09, 2017
  • Like
  • 1
Hi All,

I have contact object with 1 lookup Account name field and create_account__C  checkbox custom field  in it.(I have a trigger on this if check box is checked  account is created, i.e every contact has account record)
My scenario goes in this way-
1. If User selects both the lookup field and check box in detail page and Click on Save, it should throw the Validation Error to select any one of lookup or check box  instead of both
2. if user didnot select lookup field and check box in detail page and click on save , it should throw the validation error to select any one of lookup and check box

Thanks in advance.



 
hi this is my requirement , can you give me idea how to do this . 

i need  to create a login page or information page  ; in page 1 : i need to enter details like first name , last name and gender , in 2 nd page i need to enter hobies  , birthday and a submit button which should navigate to 3rd page and show me the entered details of first page and second page . 

 
Hai,
I have one requirment.
I created one vf page which display the records of the object along with checkbox.When i check the checkbox and click on the getrecord button it display corresponding record detail page.
here the code
vf page
-----------------------
<apex:page controller="EmployeeInformationcontroller" >
   <apex:form >
      <apex:pageBlock >
          <apex:pageBlockTable value="{!emplist}" var="e">
           <apex:column >
             <apex:inputCheckbox value="{!e.Selected__c}"/>
             </apex:column> 
          <apex:column value="{!e.First_Name__c}"/>
  <apex:column value="{!e.Middle_Name__c}"/>
  <apex:column value="{!e.Last_Name__c}"/>
  <apex:column value="{!e.Date_of_Birth__c}"/>
  <apex:column value="{!e.Father_Husband_Name__c}"/>
  <apex:column value="{!e.Marital_Status__c}"/>
  </apex:pageBlockTable>
     <apex:commandButton value="Get Record" action="{!Getrecord}"/>
      </apex:pageBlock>
   </apex:form>
</apex:page>
controller
---------------------------
public class EmployeeInformationcontroller 
{
    public list<Employee_Information__c> emplist{get;set;}
    public boolean selected{get;set;}
    public Id selectedid{get;set;}
    public EmployeeInformationcontroller()
    {
          //selectedid =ctrl.getRecord().Id; 
         selected = false;
         emplist = [select First_Name__c,Middle_Name__c,Last_Name__c,Date_of_Birth__c,Father_Husband_Name__c,Selected__c,Marital_Status__c from Employee_Information__c];
    
    }
    
    public PageReference Getrecord() 
    { 
        list<Employee_Information__c> emp1 = new list<Employee_Information__c>();
        Employee_Information__c ei = new Employee_Information__c();
        for(Employee_Information__c et:emplist)
        {
           
        }
        return null;
    }

}
please any one help me to slove this
 
before we insert a new record in the customer object calculate the tax field value based on salary field value and then insert??

How i reach the right code ..??
Hello,

 I have to create one trigger on opportunityLineItem
I can't see opportunityLineItem  in setup/customize
how can I create trigger??????

i can't see pricebook entries tab also
how can i create record for pricebook entries

 
  • July 08, 2015
  • Like
  • 0
Hello,

 Account object has   territory field and affiliation child objects with lookup relation
how to write a trigger on territory field  object
i.e record has to be  inserted in  territory field  object when the lookup account has affiliation

could  you please give me a snapshot of code

Thanks in advance..
  • July 07, 2015
  • Like
  • 0
Hi Guys,
  1. Until the Spring 15 release, Maps and Sets are Unordered Collections. So the returned order will be random.
  2. But beginning from Summer 15 release onwards, Maps and Set order is predictable. The order will be same that what you put from the beginning to end.
Example:
Map<String, String> orderedMap = new Map<String, String>();
orderedMap.put('Good', 'This is so good');
orderedMap.put('Bad', 'This is so bad');
System.debug(orderedMap);

If you run the above code snippet in Developer console you will get the returned order as below,

Until Spring 15 Release:

{Bad=This is so bad, Good=This is so good}

From Summer 15 Release:

{Good=This is so good, Bad=This is so bad}

This changes is not the API level, this is Schema level change. If anyone relying on the Map or Set order in your codes, change it as soon. 

Thanks.