• RajanJasuja
  • NEWBIE
  • 135 Points
  • Member since 2007

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 44
    Replies
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!

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

 

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