• RajanJasuja
  • NEWBIE
  • 135 Points
  • Member since 2007

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 44
    Replies

I want to use the Data Loader UPSERT function to upload contacts and accounts. Some are new, some have updated data in them. I'm using an external ID as the match. However when I'm mapping the fields I can't find the contact name AND the account name. Does this make sense? I'm not using the standard 'Import My Organizations Accounts and Contacts' as I want to import them using an external ID.

 

Thoughts???

 

Thanks...Scott

 

  • March 08, 2011
  • Like
  • 0

Hi all,

 

I have to implement a batch process and I was thinking about building the application on the Force.com platform. I'd like to hear what your suggestions are, as I'm not sure if this is something I can do using Apex classes and triggers.

 

The goal is to provide sales summary data at the Account (object) level. The sales data is stored under contact records. Here's an example to help illustrate what I'm trying to achieve:

- Account "A" has 4 contacts with sales figures. The aggregated sales data (from all contacts belonging to Account A) will be written at the Account level.

-Ideally, this sales data present at the Account object should update when: a) the sales figure on any of its contact records change, or b) A new contat record is associated with Account A and has a sales figure > 0.

 

I wanted to build a trigger on the Contact object that will fire after inserts and after updates when the criteria is met. This should work for most users when creating/updating single records, but we also have a nightly job that updates the sales figures on a large number of contact records. This number varies from 500 to over 30K contact records. What would you suggest that I do? I know that Apex allows to retrieve up to 10K records from a single SOQL query.

 

Thanks in advance.

As always I have searched the board, documentation etc before posting.

 

I am pretty sure the answer will be no, but I present the question anyway with a vague glimmer of hope.

 

We have a custom object called Address that is a child of Account.

 

It has a field called Primary.

 

We only want to have one child address of an account to have primary=true at anyone point in time.

 

I know I can do this with a trigger.

 

The problem is that when a user attempts to change an address to primary we would like to notify (via pop up) the user that this address was not primary and changing it to such will remove the primary from some other address.

 

And this has to be done in a standard Salesforce (IE not Visual Force) page.

 

Any one have any ideas beyond it would be easier to do it as a Visual Force page?

 

Thanks

Doug

 

Hi,

 

I tried to execute Database.executeBatch()..But I couldn't.:smileysad:

 

I'm using Japanese salesforce.com, so I don't know an original error message.

The message means "you don't have a permission. So you can't execute the request. Please ask owner or system administrator.".

 

 

I have a permission of system administrator and I made all custom object,Apex Trigger and classes.

 

Code is very simple:

trigger TestScript on Batch_Script__c bulk (after update) {
//if checkbox is checked, run the script
for (Batch_Script__c bs : Trigger.new) {
if (bs.Test_Script_Run__c == true) {

Job j = new Job();
Database.executeBatch(j);


//update status of Batch Script instance
Batch_Script__c ourBS = new Batch_Script__c (
Id = bs.Id,
Test_Script_Run__c=false,
Test_Script_Last_Run_Date__c=system.today()
);
update ourBS;
}
}
}

 

global class Job implements Database.Batchable<toTable__c>{

global database.Querylocator start(){
return Database.getQueryLocator([select Name__c,Run_Date__c from fromTable__c]);
}
global void executeBatch(SObject[] ttb){
List<fromTable__c> ftbl = [select Name__c,Run_Date__c from fromTable__c]; List<toTable__c> ttbl = new List<toTable__c>();

for(fromTable__c l : ftbl){
toTable__c ttbc = new toTable__c();
ttbc.Name__c = l.Name__c;
ttbc.Run_Date__c = system.today();

ttbl.add(ttbc);
}
insert ttbl;

}
global void finish(){ }
}

I am trying to capture the 'onunload' javascript event on a visual force page. Adding a html body tag and then adding the onunload event dosnt work. How can I capture this event.

In general I am trying to prompt the user when they move away from this page (either to another tab or link within the browser or if they decide to close the browser).

Thanks
Hi,
I am inserting an account and then selecting the same account using SOQL. Here is the code.
Database.saveResult[] insertedCompanies = Database.insert(companyList,true);
                Set<Id> successIds = new Set<Id>();
                for(Database.saveResult aRes : insertedCompanies){
                    successIds.add(aRes.getId());   
                }
                System.debug(successIds);
                List<Account> getAccounts = new List<Account>([SELECT Id, Name, Duns_Site_ID__c FROM Account WHERE ((Duns_Site_ID__c IN : dunsIdSet) OR (Id IN : successIds))]);
                System.debug(getAccounts'+getAccounts);
 When I run this code as a system admin System.debug(successIds); shows me an account ID in set and then query return the same record in getAccounts. But when I run the same code from a custom profile System.debug(successIds); shows me an account ID in set. But SOQL is not returning any result. My custom profile user can see the account which comes in successIds. Which means he do have access of account. Any suggestion what could be the issue?    

Thanks,
Rajan 

 
Hi, 

I have a requirement to select 10MB file in Salesforce and then send it to external system using REST API? Anyway to do this using Lightning or VF?

Thanks,
Rajan
Hi,

I build a lightning App for customer support and added this in SF1 mobile app. It is accessible by the internal user but when I logged in using community users it is not showing the Lighting app and error "URL not found" coming up. Any way to add this app for community users?

Thanks,
Rajan
 
Hi,
 
I am trying to create a new self-service portal using Community Template. I am done with my Community Template configuration. After publishing it, it looks good when we open it form browser in a mobile device. But I want to create it as a Mobile App so that users can download the App and start using it same as SF1 app. Any thoughts or help how to achieve this will be really helpful.
 
Thanks in advance,
Rajan
Hi,

I created a new Lighting App. But the problem is that I can only access it using SF1 Mobile App. Any way I can create a different Mobile App where I can access only this Lighting App. Actuary I am trying to create a Customer Support Lighting App to log and edit  a case by the customers and I don't want my customers to download SF1 mobile app.

Thanks,
Rajan
   
Hi Guys,

I am planning to create a Customer Support Mobile App where customers can create, access, edit Cases and explore the Knowledge Base. I have a very tight dead line of two weeks to build the first draft for this App and that’s why I want to use out of the box configuration to build this mobile app. I am considering the following two options
  1. Use the Lighting App with Standard Components. Here are my questions
    • Can I create a completely separate mobile APP to access the Lighting App or this can only be access within SF1 Mobile app?
    • If Lightning Apps can only be access within SF1 app. Then how we can brand SF1 app?
    • Which Salesforce licenses (Profile) I can use to access Lighting App with or without SF1 app?
    • Can Self – Service Portal access the SF1 app?
  2. Create Community using standard Community customer support template and then create a mobile app using the template files. Here are the questions
    • How to create an app from Community template pages?
    • Don’t know much about the HTML pages created by the default templates. But I hope we can customize them and brand them according to our need?
    • What are the difference using Community License or Self – Service Portal License?

If you guys think about any other options to build Support App within two weeks feel free to provide your suggestions. Please provide links or any type of study material which can help me to answer my questions. Appreciate you help on this.  

Thanks,
Rajan 

Hi,

 

I just have a test method best practice questions.

I have five Apex classes in my Dev environment length of the classes is around 500 lone of code each and they the SOQL and DML in classes are not touching the Apex governor limits as well.

Now I want to create the Test methods for them so that I can move them into the Production.  My question is, should I create a single test class for all the Apex classes or a different test class for each Apex class and what is the advantage and disadvantages to using the specific approach.

 

Any input is appreciable.

 

Cheers!

Rajan

Hi,

 

I have two questions related with Approvals.

 

1. Is their a way to make Approver comments required while approving or rejecting any record?

2.  How can we make any field required on record while some one is approving or rejecting the record?

 

 

Cheers!

Rajan

Hi,

 

I am trying to create a simple dependent picklist in Visual force. I am using apex: actionsupport tag to re-render the dependent picklist and select the specific values for it on the basis of selected value from main picklist.

 

Mani Picklist:  Project Office

Dependent Picklit : Building  

 

The issue I am facing is when I change the value of Main picklist (Project Office) it is re-rending the other picklist. But in getter of the child picklist( getTestBuildinglist() )  I am not getting the new selected value. So in getTestBuildinglist()  function the value of SelectProjectOffices is always ‘Select One’ . Idealy it should be the selected vale(‘ABC’ or ‘XYZ’ whatever user select from the Main picklist)

 

Any idea what I am missing or any other approach which can help me to implement this.

 

Here is the sample code

 

*************************VF PAGE*******************************

<apex:page controller="testController_Rajan" cache="false" id="myPage" showHeader="false" sidebar="false" standardStylesheets="true">  
 <apex:form id="myform">
 <apex:pageBlock id="mypageBlock">
 <!-- Creating Project Office picklist and binded with SelectProjectOffice contoller -->
 <apex:pageblockSection ><apex:pageBlockSectionItem >
<apex:outputLabel value="Project Office" for="ddProjectOffice"></apex:outputLabel>
<apex:selectList value="{!selectProjectOffices}" id="ddProjectOffice" size="1" required="true">
                        <apex:actionSupport event="onchange"  reRender="ddbuilding" immediate="true" />
                        <apex:selectOptions value="{!TestProjectOfficeslist}"/>
</apex:selectList>
</apex:pageBlockSectionItem>


<apex:pageBlockSectionItem >
                    <apex:outputLabel value="Building" for="ddbuilding"></apex:outputLabel>
                    <apex:selectList value="{!Buildingvalue}" disabled="{!EnabledBuilding}"  id="ddbuilding" size="1" required="true">
                    <apex:selectOptions value="{!TestBuildinglist}"/>
                    </apex:selectList>
</apex:pageBlockSectionItem>    
</apex:pageblockSection>

</apex:pageBlock>
</apex:form>  
</apex:page>

 

**************************APEX CLASS******************************************

 

public class testController_Rajan {

    public string Buildingvalue{ get; set; }
    public string selectBuilding;
    public String SelectProjectOffices;
    public List<SelectOption> optionBuliding=new List<SelectOption>();
    public boolean EnabledBuilding{get; set;}
    List<SelectOption> options = new List<SelectOption>();

 
            /*Getting values of Status picklist  of Case Object*/
            public List<SelectOption> getTestProjectOfficeslist()
            {
              
               if(SelectProjectOffices==null)
               {
               options.add(new SelectOption('Select One','Select One'));//set default value
               options.add(new SelectOption('ABC','ABC'));//set default value
               options.add(new SelectOption('XYZ','XYZ'));//set default value
               
               /*
               for(ProjectOfficeCusList__c poff : ProjectOfficeCusList__c.getAll().values())  
               options.add(new SelectOption(poff.name,poff.name));
               */
               
               SelectProjectOffices='Select One';
               setEnabledBuilding(true);
               }
               return options;
               
           }
           
           
          public List<SelectOption> getTestBuildinglist()           
          {
           
                   
               System.Debug(getSelectProjectOffices()); // Here is the issue. It is not providing the selected Value  
               optionBuliding.add(new SelectOption(SelectProjectOffices,SelectProjectOffices));//set default value
               
               /*
               if(SelectProjectOffices!='Select One')
               {
               for(Product2 p :[select p.Building__c  from Product2 p where p.Project_Office__c=:SelectProjectOffices])
               optionBuliding.add(new SelectOption(p.Building__c, p.Building__c));
               }
               */
               setEnabledBuilding(false);
               return optionBuliding;
          
           }
           
            public String getSelectProjectOffices() {
            return this.SelectProjectOffices;
            }
            
            public void setSelectProjectOffices(String S) {
                this.SelectProjectOffices= S;
            }
            
            public Void setEnabledBuilding(Boolean b) {
                this.EnabledBuilding=b;
            }
 
 }

 

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

 

Any help is appreciated.

 

Regards,

Rajan

Hi,

 

I want to user “Customer Portal” for my customers; want to give full access for some my custom object so that my customers can create their own data. I wonder, they may face a storage limitation later when data will grow up.  

Can someone give me an idea about the storage limitations for “Customer Portal” per user and per “Customer Portal”? I am currently using an enterprise edition.

 

Regards,

Rajan Jasuja

Hi,

 

As you all know Salesforce is phasing out s-control next year, so I am given the task to convert one functionality written in S-control to VF page.

 

My object is select more then 10000 records from the object (lets say my object 30000 records). Even consider by applying all filter criteria SOQL still need to fetch more than 10000 rows.

 

But when I try to select more then 10000 records using SOQL, apex throw a limit exception to me.

So any idea how we can select more then 10000 records in VF/Apex solution.

 

Any suggestion is appreciable.

 

Thanks

Rajan

Hi,


I was using google map javascript APIs with a SSL domain. "https://c.na6.visual.force.com". It was working fine, but today it is showing a "blank alert" and Google .API included URL is not loading. I have generated a new key for the same domain, but still facing the same issue.

Same code is working fine with  "https:// c.na5.visual.force.com" VF domain.
Can anyone have any idea , why this issue is coming.

 

Regards,
Rajan Jasuja

 

 

Hi,

 

As we all know S-controls will no longer exist after this year.

So I am moving some of my bulk processing S-controls functionality into VF page.

I am using AJAX toolkit in VF page and calling Apex functions from VF page.

 

 

function GetNotes()
       {
           try
             {
                var test= POSTING_DATE.toString();
                var d = new Date(test);
               
                var prevYear = d.getFullYear();
                var prevDay = d.getDate();
                var prevMonth = d.getMonth() + 1;
                var prevMonthStr = prevMonth + "";
                if(prevMonthStr.length==1)
                    prevMonthStr = "0" + prevMonthStr;

                var dte = prevYear + "-" + prevMonthStr + "-" + prevDay;
                var sql1  = "Select Id from GL_Report_Object__c Where MS_Posting_Date__c = " + dte + " AND MS_GL_Type__c in ('" + CONST_GLTYPE + "','" + CONST_GLTYPE2 + "')";
                alert("sql " +sql1);
                var result = sforce.connection.query(sql1);
                var glReportArray = new Array();
                var records= result.getArray("records");
                alert("records.length"+records.length);
                if(records.length >0)
                {
                    var ans = confirm("Entries for this month was already created. Do you want to recreate it?");
                    // confirm deletion?
                    if(ans==1)
                    {
                       var glLookupArray = new Array();
                       var j= 0;
                        for(var i=0;i<records.length;i++)
                        {
                            if(j<20)
                            {
                               glLookupArray[j]= records[i].Id;
                               j=j+1;
                            }
                            else
                            {
                                 var GLlookupResult = sforce.apex.execute('New_webservice','DeleteGLReport',{glArray : glLookupArray});
                                 alert(GLlookupResult);
                                 j=0;
                                 glLookupArray = new Array();
                            }    
                        }
                        if(j>0)
                        {
               
                            var GLlookupResult = sforce.apex.execute('New_webservice','DeleteGLReport',{glArray : glLookupArray});
                             alert(GLlookupResult);
                        }
                   }
                   else
                   {
                         ShowOrClose();
                   }
              }
              }catch(ex)
          {
              alert("ex  "+ex);
          }
       }

 

Code is working fine.But when i try to add some new code and run the Visualforce page.

I am getting the JavaScript error and the error is because when the JavaScript render to the browser some of the JS code automatically changed.

i.e.

In you above mentioned function the code was.

                var dte = prevYear + "-" + prevMonthStr + "-" + prevDay;
                var sql1  = "Select Id from GL_Report_Object__c Where MS_Posting_Date__c = " + dte + " AND MS_GL_Type__c in ('" + CONST_GLTYPE + "','" + CONST_GLTYPE2 + "')";
                alert("sql " +sql1);

But when it render to the browser it’s automatically change to the following

 

                var dte = prevYear + "-" + prevMonthStr + "-" + prevDay;

               var + dte + " AND MS_GL_Type__c in ('" + CONST_GLTYPE + "','" + CONST_GLTYPE2 + "')";

               alert("sql " +sql1);

 

Which is not an incorrect JS syntax, I don’t have any idea why its automatically changing the JS code.

Is there anything related to the VF parsing .Some time when I change the order of function it fixed ,but again when I do some changes in pre existing code or create a new function I face the same issue.

Anyone face the same issue while worked with VF and JS together.

 

Looking for your valuable suggestions.

 

Regards,

Rajan Jasuja

 

 

          }
       }

 

Hi, I am trying to create a trial account to do some research on partner portal feature of Salesforce .I register on the following URL.https://www.salesforce.com/form/trial/freetrial_prm.jsp?d=70130000000E8DKIt’s showing me a “successfully registered” message, but I don’t receive any login Info mail in my Email account . If I am trying to create a new trial account with the same Email address, it’s showing an error message which says “already registered”.

Is there any other way to enable partner portal profiles in your trial account and do some research on it? 

 

Thank You,

Rajan Jasuja

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11">

Hi,


Is there any way to get current date and time as per the logged in user time zone in apex?

I used System.now(), but its returning as per GMT time zone. I need it as per the user time zone.Like if logged in use time zone is Singapore time zone then it should return current time and date  as per the Singapore time zone which is GMT+8,  not as per the GMT time zone. 


Thanks and Regards,

Rajan Jasuja


Hi,

I have a VB desktop application and using salesforce office toolkit DLL to make calls to Salesforce. I have some  Apex class and function which I want to call by my VB application. Anyone knows how it is possible to call Apex function using VB.(I know in VB.Net we can use apex WSDL but what will be the approach when we are using DLL in VB).

Waiting for your valuable response.

Thanks

Can we mass upload Documents in salesforce using Data Loader?
If yes what is the way?

Thanks
Rajan Jasuja

 

Hi,

I am trying to migrate the data from one Salesforce org to another Salesforce org. But how can we migrate the document and notes and attachments using Date loader.
Please send any link or anything which can help me out. I have already gone throw the  salesforce_date_loader.pdf


Thansk,
Rajan Jasuja


Hi,


I am trying to upload the account and contact using Apex Data Loader, as I know we can not populate the default fields like created Date, last modified date and created by etc. But is there any way to populate any of the default field specially created Date, last modified date  or created by .I heart that or special request Salesforce provide you the population of some of the default date fields .Is it true?

Please provide your views and suggestions.

 

Thanks

Rajan Jasuja

Hi,

I am having 550 custom object .Now I want to know the name of all the custom reports whic are created on the custom objects.
One way is to go to all the reports one by one and  edit them and check the name of the object on which it is create,but it will tack a lot of time to do it ,There is any other way to get it fast?

Thanks 
Rajan Jasuja



Hi,
I am inserting an account and then selecting the same account using SOQL. Here is the code.
Database.saveResult[] insertedCompanies = Database.insert(companyList,true);
                Set<Id> successIds = new Set<Id>();
                for(Database.saveResult aRes : insertedCompanies){
                    successIds.add(aRes.getId());   
                }
                System.debug(successIds);
                List<Account> getAccounts = new List<Account>([SELECT Id, Name, Duns_Site_ID__c FROM Account WHERE ((Duns_Site_ID__c IN : dunsIdSet) OR (Id IN : successIds))]);
                System.debug(getAccounts'+getAccounts);
 When I run this code as a system admin System.debug(successIds); shows me an account ID in set and then query return the same record in getAccounts. But when I run the same code from a custom profile System.debug(successIds); shows me an account ID in set. But SOQL is not returning any result. My custom profile user can see the account which comes in successIds. Which means he do have access of account. Any suggestion what could be the issue?    

Thanks,
Rajan 

 
Hi,

I created a new Lighting App. But the problem is that I can only access it using SF1 Mobile App. Any way I can create a different Mobile App where I can access only this Lighting App. Actuary I am trying to create a Customer Support Lighting App to log and edit  a case by the customers and I don't want my customers to download SF1 mobile app.

Thanks,
Rajan
   
Hi Guys,

I am planning to create a Customer Support Mobile App where customers can create, access, edit Cases and explore the Knowledge Base. I have a very tight dead line of two weeks to build the first draft for this App and that’s why I want to use out of the box configuration to build this mobile app. I am considering the following two options
  1. Use the Lighting App with Standard Components. Here are my questions
    • Can I create a completely separate mobile APP to access the Lighting App or this can only be access within SF1 Mobile app?
    • If Lightning Apps can only be access within SF1 app. Then how we can brand SF1 app?
    • Which Salesforce licenses (Profile) I can use to access Lighting App with or without SF1 app?
    • Can Self – Service Portal access the SF1 app?
  2. Create Community using standard Community customer support template and then create a mobile app using the template files. Here are the questions
    • How to create an app from Community template pages?
    • Don’t know much about the HTML pages created by the default templates. But I hope we can customize them and brand them according to our need?
    • What are the difference using Community License or Self – Service Portal License?

If you guys think about any other options to build Support App within two weeks feel free to provide your suggestions. Please provide links or any type of study material which can help me to answer my questions. Appreciate you help on this.  

Thanks,
Rajan 
Is there a way to do this?  I know I can create an Account field that will pull most recent Opportunity amounts, dates & picklist texts, but what about text that will be different for each opportunity?  This would be helpful.  Thanks!

Hi All,

 

  I need to give access to partner objcet without ViewAllData Access to a particular profile.Can any one help me on this.

 

Thanks In Advance

Situ

I am looking for a list of standard messages used by sendCTIMessage in the Service Console. I am interested in all message, but have an urgent need for the message to transfer a call.

 

Thank you!

  • December 13, 2012
  • Like
  • 0

i have a List custom setting defined.

 

There is a button on the accounts page, which redirects to an URL.

the URL is generated from a class which returns the URL.

This class uses the custom setting values.

 

the button is working fine, also i am getting the right result even on changing the custom setting value.

 

The problem comes in the test class:

it says:

"Null Pointer Exception: Argument 1 cannot be null"

 

The custom setting has default values, i.e. is accessible to anyone.

 

The code is like:

    EncryptionVariables__c CS = EncryptionVariables__c.getInstance('Org');
           return Blob.valueOf(CS.MyAESKey__c);

 

 

Need Help

I want to use the Data Loader UPSERT function to upload contacts and accounts. Some are new, some have updated data in them. I'm using an external ID as the match. However when I'm mapping the fields I can't find the contact name AND the account name. Does this make sense? I'm not using the standard 'Import My Organizations Accounts and Contacts' as I want to import them using an external ID.

 

Thoughts???

 

Thanks...Scott

 

  • March 08, 2011
  • Like
  • 0

need help with custom fields. I need 4 fields to sum my fee balance.

Hi,

 

I have two questions related with Approvals.

 

1. Is their a way to make Approver comments required while approving or rejecting any record?

2.  How can we make any field required on record while some one is approving or rejecting the record?

 

 

Cheers!

Rajan

Hi,

 

I am trying to create a simple dependent picklist in Visual force. I am using apex: actionsupport tag to re-render the dependent picklist and select the specific values for it on the basis of selected value from main picklist.

 

Mani Picklist:  Project Office

Dependent Picklit : Building  

 

The issue I am facing is when I change the value of Main picklist (Project Office) it is re-rending the other picklist. But in getter of the child picklist( getTestBuildinglist() )  I am not getting the new selected value. So in getTestBuildinglist()  function the value of SelectProjectOffices is always ‘Select One’ . Idealy it should be the selected vale(‘ABC’ or ‘XYZ’ whatever user select from the Main picklist)

 

Any idea what I am missing or any other approach which can help me to implement this.

 

Here is the sample code

 

*************************VF PAGE*******************************

<apex:page controller="testController_Rajan" cache="false" id="myPage" showHeader="false" sidebar="false" standardStylesheets="true">  
 <apex:form id="myform">
 <apex:pageBlock id="mypageBlock">
 <!-- Creating Project Office picklist and binded with SelectProjectOffice contoller -->
 <apex:pageblockSection ><apex:pageBlockSectionItem >
<apex:outputLabel value="Project Office" for="ddProjectOffice"></apex:outputLabel>
<apex:selectList value="{!selectProjectOffices}" id="ddProjectOffice" size="1" required="true">
                        <apex:actionSupport event="onchange"  reRender="ddbuilding" immediate="true" />
                        <apex:selectOptions value="{!TestProjectOfficeslist}"/>
</apex:selectList>
</apex:pageBlockSectionItem>


<apex:pageBlockSectionItem >
                    <apex:outputLabel value="Building" for="ddbuilding"></apex:outputLabel>
                    <apex:selectList value="{!Buildingvalue}" disabled="{!EnabledBuilding}"  id="ddbuilding" size="1" required="true">
                    <apex:selectOptions value="{!TestBuildinglist}"/>
                    </apex:selectList>
</apex:pageBlockSectionItem>    
</apex:pageblockSection>

</apex:pageBlock>
</apex:form>  
</apex:page>

 

**************************APEX CLASS******************************************

 

public class testController_Rajan {

    public string Buildingvalue{ get; set; }
    public string selectBuilding;
    public String SelectProjectOffices;
    public List<SelectOption> optionBuliding=new List<SelectOption>();
    public boolean EnabledBuilding{get; set;}
    List<SelectOption> options = new List<SelectOption>();

 
            /*Getting values of Status picklist  of Case Object*/
            public List<SelectOption> getTestProjectOfficeslist()
            {
              
               if(SelectProjectOffices==null)
               {
               options.add(new SelectOption('Select One','Select One'));//set default value
               options.add(new SelectOption('ABC','ABC'));//set default value
               options.add(new SelectOption('XYZ','XYZ'));//set default value
               
               /*
               for(ProjectOfficeCusList__c poff : ProjectOfficeCusList__c.getAll().values())  
               options.add(new SelectOption(poff.name,poff.name));
               */
               
               SelectProjectOffices='Select One';
               setEnabledBuilding(true);
               }
               return options;
               
           }
           
           
          public List<SelectOption> getTestBuildinglist()           
          {
           
                   
               System.Debug(getSelectProjectOffices()); // Here is the issue. It is not providing the selected Value  
               optionBuliding.add(new SelectOption(SelectProjectOffices,SelectProjectOffices));//set default value
               
               /*
               if(SelectProjectOffices!='Select One')
               {
               for(Product2 p :[select p.Building__c  from Product2 p where p.Project_Office__c=:SelectProjectOffices])
               optionBuliding.add(new SelectOption(p.Building__c, p.Building__c));
               }
               */
               setEnabledBuilding(false);
               return optionBuliding;
          
           }
           
            public String getSelectProjectOffices() {
            return this.SelectProjectOffices;
            }
            
            public void setSelectProjectOffices(String S) {
                this.SelectProjectOffices= S;
            }
            
            public Void setEnabledBuilding(Boolean b) {
                this.EnabledBuilding=b;
            }
 
 }

 

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

 

Any help is appreciated.

 

Regards,

Rajan

Hi all,

 

I have to implement a batch process and I was thinking about building the application on the Force.com platform. I'd like to hear what your suggestions are, as I'm not sure if this is something I can do using Apex classes and triggers.

 

The goal is to provide sales summary data at the Account (object) level. The sales data is stored under contact records. Here's an example to help illustrate what I'm trying to achieve:

- Account "A" has 4 contacts with sales figures. The aggregated sales data (from all contacts belonging to Account A) will be written at the Account level.

-Ideally, this sales data present at the Account object should update when: a) the sales figure on any of its contact records change, or b) A new contat record is associated with Account A and has a sales figure > 0.

 

I wanted to build a trigger on the Contact object that will fire after inserts and after updates when the criteria is met. This should work for most users when creating/updating single records, but we also have a nightly job that updates the sales figures on a large number of contact records. This number varies from 500 to over 30K contact records. What would you suggest that I do? I know that Apex allows to retrieve up to 10K records from a single SOQL query.

 

Thanks in advance.

Hi,

 

As you all know Salesforce is phasing out s-control next year, so I am given the task to convert one functionality written in S-control to VF page.

 

My object is select more then 10000 records from the object (lets say my object 30000 records). Even consider by applying all filter criteria SOQL still need to fetch more than 10000 rows.

 

But when I try to select more then 10000 records using SOQL, apex throw a limit exception to me.

So any idea how we can select more then 10000 records in VF/Apex solution.

 

Any suggestion is appreciable.

 

Thanks

Rajan

Hello,

 

I have registered with salesforce in a Personal editions, its free and limited to one user. So i would like to know the details on user subscription charges for Enterprice and Unlimited editions of salesforce.

 

Can anyone please provide the details.

 

Thanks in advance,

Bhaskar

Hello everybody,

I've created an application on my sandbox environment that contains:

  • custom objects
  • visualforce pages
  • custom controllers


Now I want to pass all these things in my production environment.


I've created a package and uploaded it.

I got a link for the installation.

When I go to that link I can login only with my sandbox username, not with the production username.

 

Is there something wrong that I didn't uderstand?

As always I have searched the board, documentation etc before posting.

 

I am pretty sure the answer will be no, but I present the question anyway with a vague glimmer of hope.

 

We have a custom object called Address that is a child of Account.

 

It has a field called Primary.

 

We only want to have one child address of an account to have primary=true at anyone point in time.

 

I know I can do this with a trigger.

 

The problem is that when a user attempts to change an address to primary we would like to notify (via pop up) the user that this address was not primary and changing it to such will remove the primary from some other address.

 

And this has to be done in a standard Salesforce (IE not Visual Force) page.

 

Any one have any ideas beyond it would be easier to do it as a Visual Force page?

 

Thanks

Doug

 

I am trying to capture the 'onunload' javascript event on a visual force page. Adding a html body tag and then adding the onunload event dosnt work. How can I capture this event.

In general I am trying to prompt the user when they move away from this page (either to another tab or link within the browser or if they decide to close the browser).

Thanks