• sid_dev
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies

Hi,

 

I am trying to open a new browser using Process.Start with the default browser path but I get Login failure using c#

 

I have converted the password to a SecureString object as required by the Start method below

 

 

using System.Diagnostics;

 

Process.Start(defaultBrowserPath, "https://na5.salesforce.com/home/home.jsp",username,password,null);

 

  

Error -> Login failure:unknown username and password

 

Can anyone help me to understand what am I doing wrong?

 

Thanks,

Sid

  • September 21, 2011
  • Like
  • 0

Hi,

 

I am trying to override the Add Product button to get the list of all PriceBookEntries once Add Product button is clicked. I can get the list of PriceBookEntries using the related list. How can I allow the user to select them by providing the checkbox functionality? 

 

<apex:page standardController="Opportunity">
            <apex:detail subject="{!Opportunity.PriceBook2}" relatedList="true" relatedListHover="true" />           
</apex:page>

 

 

Thanks

Message Edited by sid_dev on 02-08-2010 04:50 PM
Message Edited by sid_dev on 02-08-2010 04:50 PM
Message Edited by sid_dev on 02-08-2010 04:51 PM

Hi,

 

I am trying to override the Add Product button but I don't get the list of Visual Force pages in the Content Name.

I want to show the list of Products(as it is) but with some more functionality.

 

Can someone tell em what is it that I am missing?

 

Thanks,
Sid_dev

 

Hi,

 

I am trying to fetch the selected records using list button in a page which also has a lookup field to add the account owner. How can I fetch the selected records into a List<accounts> and also the value from input field that I can update.I am getting the error 'Attempt to de-reference a null object'.

 

Currently I am fetching the vaue from the querystring from the onclick(javascript) of the list button which I don't want to do. I would appreciate if you could help me.

 

<apex:page standardController="Account" recordSetVar="accounts" extensions="UpdateOwner" tabstyle="Account" >
    <apex:form >
      <apex:pageBlock title="Update Owner">
          <apex:pageBlockSection >
              <apex:inputField value="{!Account.ownerId}" id="Owner" />   

              <apex:param value="{!$CurrentPage.parameters.array}"/>
          </apex:pageBlockSection>
          <center><apex:CommandButton action="{!save}" value="Update"/></center>        
      </apex:pageBlock>         
  </apex:form>

 </apex:page>

 

//custom controller
public class BulkUpdateOwner
{
    private Account owner ;
    private List<string> accId;
    public ApexPages.standardSetController controller {get; set;}
   
       
    //get the standard controller and the parameters
    public BulkUpdateOwner(ApexPages.StandardSetController controller)
    {                               
        try
        {
            this.controller = controller;
            //List<Account> myOppList = (List<Account>)controller.getSelected();
            this.accId = System.currentPageReference().getParameters().get('array').split(',');              
        }      
        catch(System.Exception e)
        {
            system.debug(e);
        }       
    }
  
    public Account getAccount()
    {  
          this.owner = (Account)controller.getRecord();
          return owner;   
    }        
   
    public void setAccount(Account owner) 
    {       
        this.owner=owner;   
    }   
    
    public PageReference save()
    {                          
        List<Account> a =[Select a.Id, a.OwnerId FROM Account a WHERE a.id in :this.accId];   
        for(Account acc :a)
        {       
            acc.OwnerId = this.Owner.OwnerId;
        }           
        update a;       
        return ApexPages.currentPage();
    }
}

 

 

Thanks,

Sid_Dev

Hi,

 

I have a visual force page which has an input field of type heirarchy(so it's like lookup of users). I have a command button which calls an action written in the extension for the standard controller.

 

In the following code my userObj is empty and doesn't have any value. I am not sure what is wrong. I have a seperate save methos/action for the command button to update the userobject for the value selected.

 

                        public MyExtensionController(ApexPages.StandardController stdController)
                        {       
                                   try
                                   {
                                                //get the values from input field
                                                this.userObj = (User)stdController.getRecord();

                                    }

                                     catch(System.Exception e)

                                    {

                                                system.debug(e);

                                    }

                        }

              

Any insight will be helpful

 

Thanks

Sid_dev                                                         

Hi,

 

I am trying to create a formula field containing HYPERLINK to show the VisualForce page to display some details of the case object. I want to create a link in such a way that on mouse over I can display the pop-up.

 

One thing to note here is that I need to use the case object as I need to show the details of that case in the popup. This link is to be shown in the list of all cases on he right side.

 

Can any one help me with this?

Hi,

 

I have a custom button which is passing some parametes in the URL. I want to access the querystring paramters in the VF page and assign the value to the inputField

 

I have tried the following:

 

Email: <apex:inputField value="{!$CurrentPage.parameters.email}"/><br/>

 

But I get the error message that 'paramter' does not exist. Can anyone point me to a solution or to a post where the solution is already provided.

 

Thanks

Hi,

 

I am trying to open a new browser using Process.Start with the default browser path but I get Login failure using c#

 

I have converted the password to a SecureString object as required by the Start method below

 

 

using System.Diagnostics;

 

Process.Start(defaultBrowserPath, "https://na5.salesforce.com/home/home.jsp",username,password,null);

 

  

Error -> Login failure:unknown username and password

 

Can anyone help me to understand what am I doing wrong?

 

Thanks,

Sid

  • September 21, 2011
  • Like
  • 0

Hi everyone. Our customer has a somewhat complicated price structure; I would like to show some extra pricing information in the multi-line add product screen, so that the salespeople know the pricing for different quantities of products at the moment of first entering the quantity.

 

My first idea was a "before insert" Apex trigger that fills a read-only field with the possible prices for a given client and product, and add this field to the screen - but it turns out when the user reaches that screen, the line items have not been inserted yet, so the tigger does not fire and the field stays empty.

 

Next I tried a simple formula field, maybe to show a field from the PricebookEntry object - but apparently you cannot add formula fields to the multiline layout. No custom buttons and links either.

 

My first question is: is there a really simple way to achieve what I want, that I am missing?

 

I searched around the web a bit, and it seems the only solution for similar cases is to use a custom Visualforce page; but it is not possible to override just the "multiline layout" step of the process. I would have to override the Add Products button from the Opportunity Products list view, and that would force me to replicate in Visualforce the full Add Products process, including the search and select product functionality from the previous step.

 

I am new to Visualforce and this seems like a bit of a big thing to start with, so my second question is: can I find somewhere a specific example of  replicating the Product Selection screen in Visualforce?

 

Thanks in advance. 

Hi,

 

I have a visual force page which has an input field of type heirarchy(so it's like lookup of users). I have a command button which calls an action written in the extension for the standard controller.

 

In the following code my userObj is empty and doesn't have any value. I am not sure what is wrong. I have a seperate save methos/action for the command button to update the userobject for the value selected.

 

                        public MyExtensionController(ApexPages.StandardController stdController)
                        {       
                                   try
                                   {
                                                //get the values from input field
                                                this.userObj = (User)stdController.getRecord();

                                    }

                                     catch(System.Exception e)

                                    {

                                                system.debug(e);

                                    }

                        }

              

Any insight will be helpful

 

Thanks

Sid_dev                                                         

Hi,

 

I have a custom button which is passing some parametes in the URL. I want to access the querystring paramters in the VF page and assign the value to the inputField

 

I have tried the following:

 

Email: <apex:inputField value="{!$CurrentPage.parameters.email}"/><br/>

 

But I get the error message that 'paramter' does not exist. Can anyone point me to a solution or to a post where the solution is already provided.

 

Thanks

I have a selectList tag that is disabled (and also set to readonly) but when I click a command button that rerenders the selectList, suddenly the list is enabled!  Just wondering if there is something I have done wrong, or if it's an issue with visualforce.