• rzs
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 11
    Replies

Hello,

 

I would like to use Authorize.Net AIM (Advanced Integration Method) in my trigger code for some basic payment processing. Is this possible ?

If not, can i create a separate webservice hosted on a server somewhere and call that webservice from my trigger code, or is there some other way to achieve this ?

 

Thank You

  • May 11, 2010
  • Like
  • 0

Hello,

 

In my visualforce page, i have a table consisting of a single row and three columns. The first column contains an apex:selectList, the second contains some buttons and the third column again contains an apex:selectList.

The problem is that whenever there are no items in the apex:selectList, it shrinks in size horizontally. Can i make the apex:selectList's have a fixed width irrespective of whether they contain any options or not ?

Below is the code i have :

 

 

  <table>
  <tr>
  <td align="center">   
                  <h1><FONT COLOR="#254117">Column A</FONT></h1>
                  <br></br>
                  <apex:selectList  id="first_select_list" multiselect="true"  value="{!selectedObject}" size="10" >
                      <apex:selectOptions value="{!var1}"/>
                  </apex:selectList>  
  </td>
  
  <td align="center">
                  <br></br>
                  <br></br>
                  <input type="button" value=">>" onclick="moveToRightList()"></input>
                  <br></br>
                  <br></br>
                  <input type="button" value="<<" onclick="moveToLeftList()"></input>
                  <br></br>
                  <br></br>
                   <input type="button" value="Save" onclick="saveState()"></input>
                  <br></br>
                 
              </td>
  
   <td align="center">   
                  <h1><FONT COLOR="#254117">Column B</FONT></h1>
                  <br></br>
                  <apex:selectList id="second_select_list" multiselect="true"  value="{!selectedObject}" size="10" >
                      <apex:selectOptions value="{!var2}"/>
                  </apex:selectList>  
  </td>
  </tr>
  </table>

 

Please help.

Thank You.

 

  • May 01, 2010
  • Like
  • 0

Hello,

 

I want to pass all the values present in a select list with id my_select_list, to a Controller from Javascript.Im using apex:actionFunction as follows:

 

In my Page Editor:

 

for (var i = 0; i < document.getElementById('my_select_list').length; i++)
{
                    methodOneInJavascript(document.getElementById('my_select_list').options[i].value);
                  
                  
}


<apex:outputText title="Selected Values" value="Selected Values are: {!selectedValues}" id="showstate" />

<apex:actionFunction name="methodOneInJavascript" rerender="showstate" >
            <apex:param name="firstParam" assignTo="{!selectedValues}" value="" />
 </apex:actionFunction>




In my controller:

 

 

Integer ctr = 0;
String[] selectedValues = new String[1000];


 public String[] getSelectedValues()
{
        return selectedValues;
 }
 
public void setselectedValues(String str) { selectedValues[ctr] = str; ctr+=1; }

 

But,irrespective of how many items were in the select list, the value of ctr always stays 0.Also,outputText always shows the last value passed to the Controller.

Am i going wrong somewhere ?

Is there a way to pass the entire select list to the Controller from Javascript in one shot using apex:actionFunction , and the store the select list options in a List object ?

Some sample code would be really appreciated.

 

Thank You.

 

 

 

  • April 28, 2010
  • Like
  • 0

Hello,

 

I have a select list defined as follows :

 

 

<apex:selectList id="member_list" multiselect="true" value="{!selectedMembers}" size="10" >
          <apex:selectOptions value="{!MemberNames}"/>
</apex:selectList>

 Now, {!selectedMembers} is a the list of all selected items in the select list. However,is it possible to get a list of all items (selected as well as unselected) of the above select list in my Controller, preferably as a List ?

 

 

Thank You.

 

  • April 22, 2010
  • Like
  • 0

Hello,

 

In my VisualForce page i have a select list whose values i want to pass to my Controller when the command button is pressed.

The select list  is defined as follows :

 

 <apex:selectList id="member_list" value="{!selectedMembers}" size="10" >
                 <apex:selectOptions value="{!memberNames}"/>
 </apex:selectList>

 The command button is defined as follows :

 

<apex:commandButton value="Save" action="{!move}" rerender="hiddenBlock">
              <apex:param name="selected" 
                value="{!selectedMembers}" 
                assignTo="{!selectedOptions}"/>

</apex:commandButton>
<apex:pageBlock id="hiddenBlock" rendered="false"></apex:pageBlock>

If im not mistaken, {!selectedMembers } is the set of all values in my select list.

Now, in my controller, how to define {!selectedOptions} as List <String> object ?

 

Please help

Thank You.

 

 

 

 

 

  • April 22, 2010
  • Like
  • 0

Hello,

 

I have a trigger which executes when an Opportunity is marked as 'Closed Won'. It creates/updates Contact Roles in Account based on the Contact Roles in the associated Opportunity. If a Contact Role exists in Account, it updates its Role to the Role of the Contact in the associated Opportunity.

If Account Contact Role does not exist it creates it and sets the Role to that defined in the corresponding OpportunityContactRole.

Now, if there are AccountContactRoles in the Account before the trigger executes, the trigger works fine. But, if there are no AccountContactRoles, i get the following error:

 

 

Field is not writeable: AccountContactRole.AccountId

 My code is as follows :

 

 

AccountContactRole acr = new AccountContactRole();
acr.AccountId = accountId;
acr.ContactId = o.ContactId;
acr.Role = o.Role;
insert acr;

 

 

Please help

Thank You

 

  • April 15, 2010
  • Like
  • 0

Hello,

 

I have added a multiselect List to my VisualForce page, and i want to populate it with the list of all Account Names. My Visual Force page is as follows:

 

<apex:page controller="MyController" tabStyle="Account">
   <apex:PageBlock title="My Page Block">
  <apex:form >
     
          <apex:selectList multiselect="true">
              <apex:selectOptions value="{!availableAccountsList}"></apex:selectOptions>
          </apex:selectList>
     
  </apex:form>
   </apex:PageBlock>
</apex:page>

 My Controller contains the following code :

 

 

public class MyController {

   public List <Account> availableAccountsList() {
       return [Select Name from Account];
   }

}

 

But,im getting the Error 'Error: Unknown property 'MyController.availableAccountsList'

 

 

Any way to fix this problem ?

 

Please help.

Thank You.

 

  • April 13, 2010
  • Like
  • 0

Hello,

 

Is there a way to check if a given element exists in a List or not without having to iterate through every List element, or do i have to convert the List to a set and then use the contains() method ?

 

Please help

Thanks

  • April 12, 2010
  • Like
  • 0

Hello,

 

We can assign an error to a field, but is it possible to show the error on the top of the page using Apex code ?

 

Please Help

Thank You

  • April 12, 2010
  • Like
  • 0

Hello,

 

I want to show two multiselect boxes with arrows in between them to move items from left list to the right one and vice versa. Something like the standard multiselect field that appears in any SObject. If i create a multiselect list then it appears like the plain html multiselect list not like the standard multiselect field that we can add to any SObject

Any way this can be done ?

 

Thank You

  • April 11, 2010
  • Like
  • 0

Hello,

 

Through my trigger code is there any way to lock an Opportunity so that only  users with system administrator profile can edit it and not others ?

 

Please help.

Thank You.

  • April 11, 2010
  • Like
  • 0

Hello,

 

Im using the Force.com IDE for writing Apex code. Is there any way to write debug statements to print a value to the console ?. An example would be really appreciated.

 

Thank You

  • April 09, 2010
  • Like
  • 0

Hello,

 

I have an application built in my developer organization which is on spring 10, where i need access to the Quotes standard object provided by salesforce.But since existing developer accounts on spring 10 dont have the Quotes standard object yet,i had to sign up for a new developer account to get access to it.

So, now is it possible to move/copy my application from my previous developer organization to the new one ?. Any ideas on how to achieve this would be greatly appreciated.

 

Thank You.

  • April 03, 2010
  • Like
  • 0

Hello,

 

I have the following two questions which i would like someone to please help me with

 

1. Salesforce has introduced a Quotes standard object which is available in Enterprise,Unlimited and Developer Editions. But, when i login into my developer account i dont see a Quotes object. I checked Customize under App Setup too,but its not there. Any reason why this is so ?

 

2. Is there any way to determine the version of the Salesforce Developer Edition that i use ?

 

Please help.

Thank You

Message Edited by rzs on 04-01-2010 10:09 AM
  • April 01, 2010
  • Like
  • 0

Hello,

 

I have a select list defined as follows :

 

 

<apex:selectList id="member_list" multiselect="true" value="{!selectedMembers}" size="10" >
          <apex:selectOptions value="{!MemberNames}"/>
</apex:selectList>

 Now, {!selectedMembers} is a the list of all selected items in the select list. However,is it possible to get a list of all items (selected as well as unselected) of the above select list in my Controller, preferably as a List ?

 

 

Thank You.

 

  • April 22, 2010
  • Like
  • 0

Hello,

 

In my VisualForce page i have a select list whose values i want to pass to my Controller when the command button is pressed.

The select list  is defined as follows :

 

 <apex:selectList id="member_list" value="{!selectedMembers}" size="10" >
                 <apex:selectOptions value="{!memberNames}"/>
 </apex:selectList>

 The command button is defined as follows :

 

<apex:commandButton value="Save" action="{!move}" rerender="hiddenBlock">
              <apex:param name="selected" 
                value="{!selectedMembers}" 
                assignTo="{!selectedOptions}"/>

</apex:commandButton>
<apex:pageBlock id="hiddenBlock" rendered="false"></apex:pageBlock>

If im not mistaken, {!selectedMembers } is the set of all values in my select list.

Now, in my controller, how to define {!selectedOptions} as List <String> object ?

 

Please help

Thank You.

 

 

 

 

 

  • April 22, 2010
  • Like
  • 0

Hello,

 

I have a trigger which executes when an Opportunity is marked as 'Closed Won'. It creates/updates Contact Roles in Account based on the Contact Roles in the associated Opportunity. If a Contact Role exists in Account, it updates its Role to the Role of the Contact in the associated Opportunity.

If Account Contact Role does not exist it creates it and sets the Role to that defined in the corresponding OpportunityContactRole.

Now, if there are AccountContactRoles in the Account before the trigger executes, the trigger works fine. But, if there are no AccountContactRoles, i get the following error:

 

 

Field is not writeable: AccountContactRole.AccountId

 My code is as follows :

 

 

AccountContactRole acr = new AccountContactRole();
acr.AccountId = accountId;
acr.ContactId = o.ContactId;
acr.Role = o.Role;
insert acr;

 

 

Please help

Thank You

 

  • April 15, 2010
  • Like
  • 0

Hello,

 

Is there a way to check if a given element exists in a List or not without having to iterate through every List element, or do i have to convert the List to a set and then use the contains() method ?

 

Please help

Thanks

  • April 12, 2010
  • Like
  • 0

Hello,

 

We can assign an error to a field, but is it possible to show the error on the top of the page using Apex code ?

 

Please Help

Thank You

  • April 12, 2010
  • Like
  • 0

Hello,

 

Through my trigger code is there any way to lock an Opportunity so that only  users with system administrator profile can edit it and not others ?

 

Please help.

Thank You.

  • April 11, 2010
  • Like
  • 0

Hello,

 

Im using the Force.com IDE for writing Apex code. Is there any way to write debug statements to print a value to the console ?. An example would be really appreciated.

 

Thank You

  • April 09, 2010
  • Like
  • 0

Hello,

 

I have an application built in my developer organization which is on spring 10, where i need access to the Quotes standard object provided by salesforce.But since existing developer accounts on spring 10 dont have the Quotes standard object yet,i had to sign up for a new developer account to get access to it.

So, now is it possible to move/copy my application from my previous developer organization to the new one ?. Any ideas on how to achieve this would be greatly appreciated.

 

Thank You.

  • April 03, 2010
  • Like
  • 0

Hello,

 

I have the following two questions which i would like someone to please help me with

 

1. Salesforce has introduced a Quotes standard object which is available in Enterprise,Unlimited and Developer Editions. But, when i login into my developer account i dont see a Quotes object. I checked Customize under App Setup too,but its not there. Any reason why this is so ?

 

2. Is there any way to determine the version of the Salesforce Developer Edition that i use ?

 

Please help.

Thank You

Message Edited by rzs on 04-01-2010 10:09 AM
  • April 01, 2010
  • Like
  • 0