• sivas
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies

I have a requirement in which when we click the 'X' button of the browser, it should open up a warning message with 'OK' and 'Cancel' button just like 'Confirm' box. When we click 'Ok' it should close the window and when we click 'Cancel', the window should not be closed.  

 

Any help on this is highly appreciated.

 

 

Thanks.

  • August 30, 2010
  • Like
  • 0

I am calling a web service on click of a button through java script. I am passing a string parameter to the constructor. 'a' is of type String. Also output is of type List. How to capture that? Should i have to define an array?

 

gCamp -- Callout Class

gCamp -- Constructor

 

sforce.apex.execute("gCamp","gCamp",{a:AccountId});

 

 

{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}

var accId="{!Account.Id}";

var a;

sforce.apex.execute("gCampaignInfo","gCampaignInfo",{a:accId});

 But i am getting the following error:

 

A problem with onclick java script or button was encountered:

{faultcode:'soapenv:Client', faultstring: 'No operation available for request {http://soap.sforce.schemas/package/gCamp}gCamp, please check the WSDL for this service.',}

 

Any Ideas. Thanks.

 

Siva

 

 

  • August 02, 2010
  • Like
  • 0

I couldn't capture and display the options selected in the visualforce page. I include my controller and visualforce page. Intent is a custom object. Everything looks fine, don't know what i am missing.

 

 

public class intent{

String[] intent;

public String[] getintent(){
       return intent;
}

public void setintent(String[] intent){
        this.intent = intent;
}

public list<SelectOption> getintents(){

    list<Intent__c> custintents = new list<Intent__c>();
    custintents = [SELECT Name FROM Intent__c order by CreatedDate ASC];
    
    List<SelectOption> options = new List<SelectOption>();
    
    for(Intent__c custintent : custintents){
        options.add(new SelectOption(custintent.Name,custintent.Name));
    } 
    return options;
}

public PageReference Next(){ 
    return null;

}

}

 

<apex:page controller="intent">
<apex:form id="form1">
    <apex:selectCheckboxes value="{!intent}" onselect="{!intent}">
        <apex:selectOptions value="{!intents}"> </apex:selectOptions>
    </apex:selectCheckboxes>
    <apex:commandButton action="{!Next}" value="Next" reRender="out" status="status"/>
</apex:form> 

<apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel >
                    <p>You have selected:</p>
                    <apex:dataList value="{!intent}" var="c">a:{!c}</apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
       
</apex:page>

 

 

 

  • July 29, 2010
  • Like
  • 0

 

I have a custom Script object which has lookup with Account. Script object has 'Script_Category', 'Script_Type' and 'Script_Text' fields. I have created a button on the Account object which on clicking opens up a visualforce page which displays DISTINCT 'Script_Categories' as output links. Once you click any of the output link it displays its corresponding 'Script_Types' and then on clicking one of the 'Script_Types' it should display the respective 'Script_Text'. I managed to display 'Script_Category' but couldn't figure out how to deal with output links. I am including my code below. Any help. 

 

I created a custom objects Script which has lookup to Account. Script object has 'Script_Category' and 'Script_Text' fields. I have created a button on the Account object which on clicking opens up a visualforce page which displays DISTINCT 'Script_Categories' as output links related to that Account. Once you click any of the output link it displays its corresponding 'Script Names' associated with that 'Script_Category' (of course related to that particular account) as links or buttons and then on clicking one of the 'Script Names' it should display the respective 'Script_Text'. I managed to display 'Script_Category' but couldn't figure out how to deal with output links. I am including my code below. 

 

 

<apex:page standardController="Account" extensions="distinctcategory">
  <apex:pageBlock title="Script Category">
     <apex:dataList value="{!Categories}" var="cat" type="circle"> 
        <apex:outputLink > {!cat} </apex:outputLink> 
     </apex:dataList>
  </apex:pageBlock>  
</apex:page>

 

 

public class distinctcategory {
	
	Account acc;
	Account accRec;
	list<Script__c> scr = new list<Script__c>(); 
	String[] sc = new list<String>();
	
	/*################ Constructor #####################*/
	
	public distinctcategory(ApexPages.StandardController stdcontroller){
		getCategories();
	}
	
	/*############## Returns Script Categories ##############*/
	
	public String[] getCategories(){
		
		scr = [select Name, Script_Category__c, Script_Text__c from Script__c 
	    	   where Script__c.Account__c=:ApexPages.currentPage().getParameters().get('id')];
	    list<String> distinct = new list<String>(); 
	    
	    for(integer i=0; i<scr.size(); i++){
	    	distinct.add(scr[i].Script_Category__c);
	    }
	 	 
		list<String> sc = new list<String>();
		sc=distinctcategories(distinct);
		return sc;
    }
    
    /*############# Returns Distinct Script Categories #################*/
    
    public list<String> distinctcategories(list<String> distinct){
    	list<String> distinctcate = new list<String>();
    	
    	integer sizetest = distinct.size();
    	system.debug('Size is >>>>>>>'+sizetest);
    	
    	for(String cate : distinct){
    		Boolean found = false;
    		
    		for(integer i=0; i<distinctcate.size(); i++){
    			if(cate.equals(distinctcate[i])){
    				found = true;
    				break;
    			}
    		}
			if(!found){
    			distinctcate.add(cate);
    		}
        }
    	return distinctcate;
    }

 

Thanks in advance.

 

 

 

 

Teja

  • May 11, 2010
  • Like
  • 0

Hi,

I know that Email to Case agent has a daily limit of 2500. I also read some where in the forum that with one API call, we can process 10 emails. Does it mean we can process 25000 email per day??? Is the limitation on number of API calls or number of emails processed?? Any input on this is highly appreciated. 

  • April 28, 2010
  • Like
  • 0

I have a answers custom object. It has multiple pages and each page displays an answer. I wanted to include different Visual Force section in the page layout for each and every page for same user profile. Any ideas are highly appreciated. 

 

Thanks.

  • March 15, 2010
  • Like
  • 0

I have a requirement in which when we click the 'X' button of the browser, it should open up a warning message with 'OK' and 'Cancel' button just like 'Confirm' box. When we click 'Ok' it should close the window and when we click 'Cancel', the window should not be closed.  

 

Any help on this is highly appreciated.

 

 

Thanks.

  • August 30, 2010
  • Like
  • 0

I couldn't capture and display the options selected in the visualforce page. I include my controller and visualforce page. Intent is a custom object. Everything looks fine, don't know what i am missing.

 

 

public class intent{

String[] intent;

public String[] getintent(){
       return intent;
}

public void setintent(String[] intent){
        this.intent = intent;
}

public list<SelectOption> getintents(){

    list<Intent__c> custintents = new list<Intent__c>();
    custintents = [SELECT Name FROM Intent__c order by CreatedDate ASC];
    
    List<SelectOption> options = new List<SelectOption>();
    
    for(Intent__c custintent : custintents){
        options.add(new SelectOption(custintent.Name,custintent.Name));
    } 
    return options;
}

public PageReference Next(){ 
    return null;

}

}

 

<apex:page controller="intent">
<apex:form id="form1">
    <apex:selectCheckboxes value="{!intent}" onselect="{!intent}">
        <apex:selectOptions value="{!intents}"> </apex:selectOptions>
    </apex:selectCheckboxes>
    <apex:commandButton action="{!Next}" value="Next" reRender="out" status="status"/>
</apex:form> 

<apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel >
                    <p>You have selected:</p>
                    <apex:dataList value="{!intent}" var="c">a:{!c}</apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
       
</apex:page>

 

 

 

  • July 29, 2010
  • Like
  • 0

Hi,

I know that Email to Case agent has a daily limit of 2500. I also read some where in the forum that with one API call, we can process 10 emails. Does it mean we can process 25000 email per day??? Is the limitation on number of API calls or number of emails processed?? Any input on this is highly appreciated. 

  • April 28, 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