• Santosh Kumbar
  • NEWBIE
  • 273 Points
  • Member since 2010

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 59
    Replies

Hi,

 

My requirement is when a checkbox is checked ,two corresponding input fields must be enabled or else disabled.

 

For this i have written the below code:

 

<apex:inputCheckbox value="{!Family__c.Insurance_taken_for_Loan__c}"/>
<apex:actionSupport event="onchange" rerender="theBlock"/>
<apex:inputText value="{!Family__c.Insurance_Premium_Paid__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>
<apex:inputText value="{!Family__c.Insurance_Renewal_Date__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>

<apex:inputCheckbox value="{!Family__c.Insurance_taken_for_Loan__c}"/>
<apex:actionSupport event="onchange" rerender="theBlock"/>
<apex:inputText value="{!Family__c.Insurance_Premium_Paid__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>
<apex:inputText value="{!Family__c.Insurance_Renewal_Date__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>

 

But each time i check the checkbox,the input field is not getting enabled.

 

Please help me in this context.

 

Thanks in advance.

 

Regards,

rabi

  • March 18, 2013
  • Like
  • 0

Added a custom button on the Case Record that opens a new email. How do I get it to populate the email subject and body? This is the link that I added to the button:

 

https://na14.salesforce.com/_ui/core/email/author/EmailAuthor?htmlBody=hello+world&p2_lkid={!Contact.Id}&rtype=003&p3_lkid={!Case.Id}&retURL=%{!Case.Id}

 

Alternatively, is there any way to pass in a string variable from the URL that populates the subject & body value?  Not interested in using SFDC's email templates, since they cannot be modified before sending.

 

Thanks in advance for the help.

Hi all!

 

I'm trying to get a field to auto update based upon the formula below:

 

text(Campus__c)&" "&StartDate&" "& Type "

 

It's supposed to update to '(School Location) - 10-23-2012 - Open House'

 

However, the formula isn't working.

 

Thanks for any help!

Hello all,

 

I was wondering if this is possible with APEX code.

 

trigger NewCarEntry on Object (before insert) {
List<Object> newEntry = [SELECT id, Name FROM Object WHERE Color__c = 'Red'AND Model__c ='Seat'  LIMIT 1000];

//this is trigger and the list newEntry contains a number of items based Color__c and Model__c

for (Object o: Trigger.new) {
  if(*/here is where I want to know how to look in the newEntry list and if it finds a record that match the criteria in that list, to update a number of fields on that new record/*

 

I was wondering if this is possible. Create a list (SQOL Query)  based on a couple of fields and then use the IF statement to select those records that match the criteria on the list and update a number of fields on those records.

Can anyone help me with this?

 

Regards,

 

Carlos

Hi,

 

I have added the custom button but i am not able to delete the reference from layout.

 

can anyone guide me?

 

 

Can someone tell me why the subquery is throwing an error in developer console...????
Opportunity opp = [Select Id, (Select Id, Status__c from Object__r where Status__c = 'Waiting for their Turn') from Opportunity where Id = 'XXXXXXXXXXXXXXX'];
Object__c is detail to Opportunity ....

Error is:
"Didn't understand relationship 'Object__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names."

Its urgent.. Thanks..!!!

  • September 04, 2012
  • Like
  • 0

Hi All,

 

i want to know is there any way to get date format as 'DD MMM,YYYY'.i.e 20 Mar,2011.

if possibe, Pls can you explain how do i get that date format.

in my requirement having both Standard and Custom Pages on both Pages i need dispaly in "DD MMM,YYYY" Format dates.

 

Reds,

Buss

  • January 04, 2012
  • Like
  • 0

Hi,

    I have a custom object called Notification__c.Entries are made in this object when a trigger is fired.This object also has a feild Ownerid__c.Now I wanna write a custom page where an owner can see only the records that are owned by him . Can you please tell me how to capture user's info based on their login credentials.I wanr to capture that info and use it in SOQL query like this:

   Select * from Notification__c where (ownerid__c = information provided by login credentials of user )

 

Plz help,it's urgent

Thanks

I have two big objects BO1__b and BO2__b and need to establish the relationship between both big objects. 
When I tried to create lookup relation between BO1 & BO2 giving me the error of invalid objecttype. 
Question is: Big Object can have lookup fields referncedTo only Standard and Custion Objects?

Thanks,
Santosh
I am trying to add custom tile on PDF page. Its always showing VF page API name in title. I tried <head><title>example</title></head> but no success.

<apex:page showHeader="false" renderAs="pdf">
<head>
<title> Example!!</title>
</head>
TEST
</apex:page>


User-added image


Thanks!
Hi Guys,

Do anyone have pointer around how the OpenText and Salesforce integration can be done? 
I have basic requirement like search a document from Salesforce UI and get it from Open Text if it exists there.
[Basically I am looking for Search API of Opentext]

It would be great help if you can provide me any pointers.

Regards,
Santosh

Guys,

 

Could some one tell me, Is DST correction handled in salesforce internally? As i seen different calculation result when user's time zone in GMT and PST for the month March and Nov. Any pointers would be appreciable.

 

Regards

san

Guys, Could some one tell me, Is DST correction handled in salesforce internally? As i seen different calculation result when user's time zone in GMT and PST for the month March and Nov. Any pointers would be appreciable. Regards san

Guys,

 

I need to create Email Service when Package installed on org with Predefined name. So is it possible.?

 

Any pointers would be helpful for me.

 

 

Thanks

Santosh

santosh kumbar

I am getting This error from since long time ; It comes all of sudden..

What Is the mistake  I AM DOING HERE

***************VF**********************************
<apex:page  controller="wrapperClassController">
    <apex:form >
        <apex:pageBlock >
            <apex:outputLabel value="Enter Text"> <apex:inputText label="Search Leads" value="{!searchText}"/></apex:outputLabel>
            <apex:commandButton action="{!Search}" value="Search"/>
                        <apex:pageBlockTable value="{!Leads}" var="c" id="table">
                <apex:column >
                    <apex:inputCheckbox value="{!c.selected}"/>
                </apex:column>
                <apex:column value="{!c.con.Name}" />
                <apex:column value="{!c.con.Email}" />
                <apex:column value="{!c.con.Phone}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>


***************************************************

*****************Controller**********************
public class wrapperClassController {

    //Our collection of the class/wrapper objects LeadWrapper
    public List<LeadWrapper> leadList {get; set;}
    
    public String searchText {get; set;}
    public List<Lead> searchList;


    public List<LeadWrapper> getLeads() {
        if(leadList == null) {
            leadList = new List<LeadWrapper>();
            String qry = 'select id, Name, Email,Street,Phone from lead where name LIKE \'%'+searchText+'%\' OR Email LIKE \'%'+searchText+'%\'  order by name';
            searchList = Database.query(qry);
            for(Lead c : searchList ) {
                
                leadList.add(new LeadWrapper(c));
            }
        }
        return leadList;
    }

    public PageReference Search(){
        getLeads();
        return null;
    }


    
    public class LeadWrapper {
        public Lead con {get; set;}
        public Boolean selected {get; set;}

        public LeadWrapper(Lead c) {
            con = c;
            selected = false;
        }
    }
}
**************************************************

Hi

 

I have created sample Site using Siteforce studio and now i want expose it, so that people can see my page without any logins....

(Sample site is in my Developer org)

 

Could some one help me...!!!!!!

 

San

Can some help me in below case..

 

I have requirement where i need to parse XMl file and select object in which we need to insert this xml data.

 

all xml data should create records in Selected object

 

 

Please reply asap.

 

 

Regards

San

Hi all,

 

I'm using data loader v22.0, for the Batch process of data. When i run through command line its giving error. Can some one suggest me which JRE version is need to run dataloaderv22.0?

 

Its urgent

 

Thanx

san

I am facing weird problem with Run all test.  I have trigger and respective test class. When I run individual run test its coverage is 97% but then when I do Run All test for my org it showing 52% fro same trigger. When I see graphical coverage red lines are on commented line and blank line of trigger :( Is this normal bug? Or special case?

 

Help me.....

 

 

 

San

Hi all

  i used VF page in case layout which displays the long text from other object. now text when i included it in case layout it should vary according to the text size... please help me some one...

 

 

I am trying to add custom tile on PDF page. Its always showing VF page API name in title. I tried <head><title>example</title></head> but no success.

<apex:page showHeader="false" renderAs="pdf">
<head>
<title> Example!!</title>
</head>
TEST
</apex:page>


User-added image


Thanks!
Hi,

I'm using svg and use tags in a lightning component. I get the error:
 
Failed to save undefined: No COMPONENT named markup://use found

For the code: 
 
<svg aria-hidden="true" class="icon icon--large icon-standard-user">
                  			<use xlink:href="assets/icons/standard-sprite/svg/symbols.svg#user" />
                		</svg>

What am I doing wrong here?

Thanks!

Getting below error while saving new Quote line item.

 

 

common.exception.SfdcSqlException: ORA-20003: ORA-06512: at "HAPPY.CSTORAGELIMIT", line 197 ORA-06512: at "HAPPY.CSTORAGELIMIT", line 664 ORA-06512: at "HAPPY.CSTORAGELIMIT", line 711 ORA-06512: at "HAPPY.CSAVEUTILS", line 437 ORA-06512: at "HAPPY.CSTANDARDENTITYDATATEMPLATE", line 1918 ORA-06512: at line 1 {call cStandardEntityDataTemplate.insert_stdentdatas(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} {call cStandardEntityDataTemplate.insert_stdentdatas(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}

 

 

 

 

--san

Hi,

I am using person account. I am trying to differentiate person account and business account by using auto number, Person account will have auto number as APP-0001 and business account will have BA-0001.

Can anyone give a good solution for this in the form of a trigger or any other solution is greatly appreciated.

can anyone please let me know the steps to go for in order to to do a bulk merge for Contact records.

 

 

Thanks,

Hi Can any one please help me out for this trigger test class

 

Thanks In Advance

 

trigger trgSystemSize on oe_order_lines__c (before Insert, before Update)
{
    Set<String> ords = new Set<String>();
    for(oe_order_lines__c ord : Trigger.New){   
       if (String.isNotBlank(ord.ITEM_NUMBER__c))
             ords.add(ord.ITEM_NUMBER__c );
    }
 
    if(!ords.IsEmpty())
    {
        Map <String, Item__c> actt = new  Map <String, Item__c>();
        for (Item__c act : [SELECT id,Name,Item_ID__c, Product_Type__c, Item_Category_3__c FROM Item__c  WHERE Item_ID__c IN: ords])                            
                               
                              

                            
                            {
                            system.debug('########--actt--> ' + act);
            actt.put(act.Item_ID__c, act);      
        }
 SYSTEM.DEBUG('--actt--> ' + actt);       
        for(oe_order_lines__c ord1: trigger.new)
        {
            if(String.isNotBlank(ord1.ITEM_NUMBER__c) && actt.containskey(ord1.ITEM_NUMBER__c))
            {
                ord1.Item_Number_Order_Line__c = actt.get(ord1.ITEM_NUMBER__c).Id;                              
                      
                                 
                            
                }
            }            
        }        
    }

Hi frndz,

                I have a scenario i.e, iam querying a records by Dynamic SOQL with retun type list<sobject>.I want to display thus retrieved fields in a PageBlock Table for that object...How can i acheive this..

Class:

    public PageReference pbrecords() {
    
    List<sobject> recs=Database.query('Select id,Name from '+sobj+' Where Name =:'+name);
        selected_Objrecs =new list<sobject>();
        for(sobject s:recs){
        
            selected_Objrecs.add(s);
        }
        return null;
    }

  public list<sobject> selected_Objrecs { get; set; }

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

V.F:

<apex:pageBlockTable value="{!selected_Objrecs}" var="a">
                  <apex:column value="{!a}" />
    </apex:pageBlockTable>

Hi,

 

My requirement is when a checkbox is checked ,two corresponding input fields must be enabled or else disabled.

 

For this i have written the below code:

 

<apex:inputCheckbox value="{!Family__c.Insurance_taken_for_Loan__c}"/>
<apex:actionSupport event="onchange" rerender="theBlock"/>
<apex:inputText value="{!Family__c.Insurance_Premium_Paid__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>
<apex:inputText value="{!Family__c.Insurance_Renewal_Date__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>

<apex:inputCheckbox value="{!Family__c.Insurance_taken_for_Loan__c}"/>
<apex:actionSupport event="onchange" rerender="theBlock"/>
<apex:inputText value="{!Family__c.Insurance_Premium_Paid__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>
<apex:inputText value="{!Family__c.Insurance_Renewal_Date__c}" disabled="true" rendered="{!(Family__c.Insurance_taken_for_Loan__c == false)}"/>

 

But each time i check the checkbox,the input field is not getting enabled.

 

Please help me in this context.

 

Thanks in advance.

 

Regards,

rabi

  • March 18, 2013
  • Like
  • 0

Added a custom button on the Case Record that opens a new email. How do I get it to populate the email subject and body? This is the link that I added to the button:

 

https://na14.salesforce.com/_ui/core/email/author/EmailAuthor?htmlBody=hello+world&p2_lkid={!Contact.Id}&rtype=003&p3_lkid={!Case.Id}&retURL=%{!Case.Id}

 

Alternatively, is there any way to pass in a string variable from the URL that populates the subject & body value?  Not interested in using SFDC's email templates, since they cannot be modified before sending.

 

Thanks in advance for the help.

<apex:page standardController="Emp__c"  sidebar="false" extensions="EmpPage">
 <script> 
 </script>
 <apex:form >
 <apex:pageMessages ></apex:pageMessages>
 <apex:pageBlock title="Employee Edit">
 <apex:pageBlockButtons >  <apex:commandButton value="Save" action="{!saveRecordvalues}" immediate="true" />
  <apex:commandButton value="Cancel"/>
  </apex:pageBlockButtons>
 <apex:pageBlockSection columns="1" title="Information">
  <apex:pageBlockSectionItem > Employee Name : <apex:inputField value="{!proxyObject.Name}"/></apex:pageBlockSectionItem>
  <apex:pageBlockSectionItem >  Emp No : <apex:inputField value="{!proxyObject.Emp_No__c}"/> </apex:pageBlockSectionItem>
  <apex:pageBlockSectionItem >    Salary : <apex:inputField value="{!proxyObject.Salary__c}"/>   </apex:pageBlockSectionItem>
  <apex:pageblockSectionItem >Department : <apex:inputField value="{!proxyObject.Dept__c}"/> </apex:pageblockSectionItem>
  </apex:pageBlockSection>
 </apex:pageBlock>
 </apex:form>
</apex:page>

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

public class EmpPage {
 
    public String retURL;
    public EmpPage(ApexPages.StandardController controller) {
        }
   
    public Emp__c e {set; get; }
   
    public Emp__c getProxyObject()
    {
     if ( e == null)
     {
      e = new Emp__c();
      return e;
     }
     else
      return e;
    }
   
    public void saveRecordvalues()
    {
        System.debug('***************'+e+'********'+e.Dept__c);
     try
     {
     System.debug('*******I am in try Block*********');

     if( e!= null && e.Dept__c != null)
     {
      Emp__c e1= new Emp__c();
      e1.Name = e.Name;
      e1.Salary__c = e.Salary__c;
      Dept__c ls = [select Id from Dept__c where Name =: e.Dept__c limit 1];
      e1.Dept__c = ls.Id;
      e1.Emp_No__c = e.Emp_No__c;
      insert e1;
      System.debug('***********Record Inserted Successfully***************');
       }
      }
     catch(Exception e)
     {
      apexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Problem Saving Record into object' +e));
     }  
    }

}

When ever i clicking on the button am getting null value to the "e" variable am not able to save the record. Can any one tell me wht mistake am doing in vf page.

  • March 04, 2013
  • Like
  • 0

I have to create MD5 string in opportunity what is it and how to create it

  • March 04, 2013
  • Like
  • 0

Guys,

 

Could some one tell me, Is DST correction handled in salesforce internally? As i seen different calculation result when user's time zone in GMT and PST for the month March and Nov. Any pointers would be appreciable.

 

Regards

san

Is it possible to remove required fields from standard objects? I'm specifically interested in removing the "Last Name" required field from the Lead object. 

 

I understand that you can remove the "Company" field requirement by enabling the Person Account feature.

http://blog.jeffdouglas.com/2010/06/22/working-with-person-accounts-in-salesforce-com/

 

Is there a similar solution for the "Last Name" field?

 

Thanks for the help in advance!

 Hi Folks,

 

How to get the Apex class name of the batch job id in batch apex. can any one suggest me. this is very urgent..............pleaseeeee......................

 

thanks

krish

Hi

 

Interview Question:How many fields we have to create in an object?can anybody help me?

Hi all!

 

I'm trying to get a field to auto update based upon the formula below:

 

text(Campus__c)&" "&StartDate&" "& Type "

 

It's supposed to update to '(School Location) - 10-23-2012 - Open House'

 

However, the formula isn't working.

 

Thanks for any help!