• Manasa.R
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 4
    Replies

Hi,

 

I need to display an error message when one of the fields is null. 

 VF Page :

 

<apex:page controller="conAddmailsIds" sidebar="true" showHeader="true" >
<apex:pagemessages/>
<apex:pageBlock id="block">
<apex:pageBlockSection >
<apex:panelGroup >
<center>
<apex:selectList id="select" value="{!selectId}" size="1">
<apex:selectOptions value="{!autoRun}" />
</apex:selectList>

<apex:inputText id="searchText" value="{!searchText}"/>
<apex:commandButton value="Search" action="{!getAllEmployees}" rerender="searchResult" status="status"/>
</center>

<apex:commandButton value="Hierarchy" action="{!getEmpHierarchyData}" rerender="searchResult" status="status"/>

</apex:panelGroup>
</apex:pageBlockSection>
<apex:messages/>

<apex:actionStatus id="status" startText="Searching... please wait..."/>

--------

</apex:page>

 

Controller:

 

public PageReference getAllEmployees(){
if(searchText == '' || searchText == null){
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Add your message here');
ApexPages.addMessage(myMsg);
return null;
}

......

 

I have tried with both apex:messages and apex:pagemessages, still nothing is working. Is there any page level settings to be done?

I am not able to figure out why the error message is not getting printed. Is there anything else i need to do here?

 

Thanks in advance!

 

Regards,

Manasa R

Hi,

 

I have a VF page which lists out all the attachments of a specific record. Now i need to let the user select which all attachment  he wants to send and pass it onto Standard Send Email page where it gets listed in the Attachment section.

 

Can anyone please help me on how to achieve this?

 

Thanks in advance

 

Regards,

Manasa 

Hi,

 

I have a VF page which has a list of email ids listed as checkboxes. I have 3 buttons:

1. TO - which adds the selected emails to TO list

2. CC - which adds the selected emails to CC list

3. Next - which redirects to Send Email page.

 

But i am facing a problem, when i click on any of the button nothing happens.... page just gets refreshed. Though i have few debug statements in my action methods nothing comes in logs. 

 

VF page is:

<apex:page controller="conAddmailsIds" >
<apex:form >
Select Emails Ids:
<!-- <apex:selectRadio value="{!emailToAdd}" > <br/> -->
<apex:selectCheckboxes value="{!emailToAdd}">
<apex:selectOption itemLabel="manasa.r@hp.com" itemValue="manasa.r@hp.com"></apex:selectOption><br/>
<apex:selectOption itemLabel="manasa.r.gupta@gmail.com" itemValue="manasa.r.gupta@gmail.com"></apex:selectOption>
<apex:selectOption itemLabel="abc@def.com" itemValue="abc@def.com"></apex:selectOption>
<apex:selectOption itemLabel="ghi@jkl.com" itemValue="ghi@jkl.com"></apex:selectOption>
<apex:selectOption itemLabel="mno@pqr.com" itemValue="mno@pqr.com"></apex:selectOption>
</apex:selectCheckboxes>
<!-- </apex:selectRadio> -->
<apex:commandButton value="To" action="{!addToList}"/>
<apex:commandButton value="CC" action="{!addCCList}"/>

<br/> Selected aditional TO email ID is : {!toList}
<!-- <apex:dataList value="{!toList}" var="c">{!c}</apex:dataList> -->
<br/> Selected CC email ID is : {!ccList} <!-- <apex:dataList value="{!ccList}" var="c">{!c}</apex:dataList> -->

<br/> <apex:commandButton value="Next" action="{!conAddEmailsIds}"/>
</apex:form>
</apex:page>

 

Apex code:

 

public class conAddmailsIds{

public String [] emailToAdd{get;set;}
public String [] toList{get;set;}
public String [] ccList{get;set;}

public Pagereference conAddEmailsIds(){
system.debug('@@@@@@ in add'+toList);
PageReference p = new PageReference('/_ui/core/email/author/EmailAuthor?p24='+toList+'&p4='+ccList);
return p;
}
public Pagereference addToList(){
system.debug('@@@@@@ in to list'+emailToAdd);
toList = emailToAdd;
return null;
}
public Pagereference addCCList(){
ccList = emailToAdd;
return null;
}
}

Can anyone help me to figure out when there no action on click of button?

 

Regards,

Manasa

Hi,

 

I have a query on S2s connection. 

 

I have enabled S2S connection in one of our Sandbox and havnt still enabled in Production.

According to the setting rules, we cannot revert back the S2S connection. But what will happen to this setting if we refresh from the Production, where s2s connection is still not enabled. 

 

Regards,

Manasa R

Hi,

 

I have a query on S2s connection. 

 

I have enabled S2S connection in one of our Sandbox and havnt still enabled in Production.

According to the setting rules, we cannot revert back the S2S connection. But what will happen to this setting if we refresh from the Production, where s2s connection is still not enabled. 

 

Regards,

Manasa R

Hi,

 

I have enabled Salesforce to salesforce connectivity between 2 sandboxes. Now i need check the logs when a record is shared between the sandboxes.

I tried adding "Connection User" in the debug logs, but got an error message "Error: No Matching user found".

Can anyone help me on how can i find the logs while sharing the records?

 

Thanks in advance!

Regads,

Manasa R

Hi,

 

I have a jar file with me which contains a HTML Page. I need to call this html page in my VF page.

I know i can access this HTML Page, if i upload this jar file as Static resource. But, my jar file is more than 5MB hence i cant upload into static resource.

So i am planning to load the jar as Document or attachment and call the HTML page from there.

I want to know if this is possible

I tried to do something like below

Controller class:

 

public withsharingclasscompareOrgController {

 

publicblob docblob{get;set;}

 

public string docblob1{get;set;}

 

public string docblob2{get;set;}

 

publiccompareOrgController(){

 

Document doc = [select id,body from document where id='015Z0000000DUze'];

 

Document doc1 = [select Url from document where id='015Z0000000DUze'];

 

system.debug('*****'+doc);

 

system.debug('*****'+doc1);

docblob=doc.Body;

docblob1 =doc.id;

docblob2= doc1.Url;

}

 

}

 

VF Page:

<apex:page controller="compareOrgController">
     <apex:outputLabel >{!docblob}</apex:outputLabel>
    <apex:outputLink > {!docblob2}</apex:outputLink>
</apex:page>

 

Kindly help me on how this can be achieved.

If not Document is there any other way that i can upload my jar and access the HTML page?

 

 

Hi,

 

I am trying to get a list of workflows in apex without generating any Metadata xml.

 

Kindly help me with this.

Hi,

 

I am trying to develop an app which compares two salesforce instance.

I know i need to use Metadata API to ahieve this.

And i need to do this using Apex.

 

Please guide me on moving ahead with this.

Hi,

 

I need to display an error message when one of the fields is null. 

 VF Page :

 

<apex:page controller="conAddmailsIds" sidebar="true" showHeader="true" >
<apex:pagemessages/>
<apex:pageBlock id="block">
<apex:pageBlockSection >
<apex:panelGroup >
<center>
<apex:selectList id="select" value="{!selectId}" size="1">
<apex:selectOptions value="{!autoRun}" />
</apex:selectList>

<apex:inputText id="searchText" value="{!searchText}"/>
<apex:commandButton value="Search" action="{!getAllEmployees}" rerender="searchResult" status="status"/>
</center>

<apex:commandButton value="Hierarchy" action="{!getEmpHierarchyData}" rerender="searchResult" status="status"/>

</apex:panelGroup>
</apex:pageBlockSection>
<apex:messages/>

<apex:actionStatus id="status" startText="Searching... please wait..."/>

--------

</apex:page>

 

Controller:

 

public PageReference getAllEmployees(){
if(searchText == '' || searchText == null){
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Add your message here');
ApexPages.addMessage(myMsg);
return null;
}

......

 

I have tried with both apex:messages and apex:pagemessages, still nothing is working. Is there any page level settings to be done?

I am not able to figure out why the error message is not getting printed. Is there anything else i need to do here?

 

Thanks in advance!

 

Regards,

Manasa R

Hi,

 

I have a VF page which has a list of email ids listed as checkboxes. I have 3 buttons:

1. TO - which adds the selected emails to TO list

2. CC - which adds the selected emails to CC list

3. Next - which redirects to Send Email page.

 

But i am facing a problem, when i click on any of the button nothing happens.... page just gets refreshed. Though i have few debug statements in my action methods nothing comes in logs. 

 

VF page is:

<apex:page controller="conAddmailsIds" >
<apex:form >
Select Emails Ids:
<!-- <apex:selectRadio value="{!emailToAdd}" > <br/> -->
<apex:selectCheckboxes value="{!emailToAdd}">
<apex:selectOption itemLabel="manasa.r@hp.com" itemValue="manasa.r@hp.com"></apex:selectOption><br/>
<apex:selectOption itemLabel="manasa.r.gupta@gmail.com" itemValue="manasa.r.gupta@gmail.com"></apex:selectOption>
<apex:selectOption itemLabel="abc@def.com" itemValue="abc@def.com"></apex:selectOption>
<apex:selectOption itemLabel="ghi@jkl.com" itemValue="ghi@jkl.com"></apex:selectOption>
<apex:selectOption itemLabel="mno@pqr.com" itemValue="mno@pqr.com"></apex:selectOption>
</apex:selectCheckboxes>
<!-- </apex:selectRadio> -->
<apex:commandButton value="To" action="{!addToList}"/>
<apex:commandButton value="CC" action="{!addCCList}"/>

<br/> Selected aditional TO email ID is : {!toList}
<!-- <apex:dataList value="{!toList}" var="c">{!c}</apex:dataList> -->
<br/> Selected CC email ID is : {!ccList} <!-- <apex:dataList value="{!ccList}" var="c">{!c}</apex:dataList> -->

<br/> <apex:commandButton value="Next" action="{!conAddEmailsIds}"/>
</apex:form>
</apex:page>

 

Apex code:

 

public class conAddmailsIds{

public String [] emailToAdd{get;set;}
public String [] toList{get;set;}
public String [] ccList{get;set;}

public Pagereference conAddEmailsIds(){
system.debug('@@@@@@ in add'+toList);
PageReference p = new PageReference('/_ui/core/email/author/EmailAuthor?p24='+toList+'&p4='+ccList);
return p;
}
public Pagereference addToList(){
system.debug('@@@@@@ in to list'+emailToAdd);
toList = emailToAdd;
return null;
}
public Pagereference addCCList(){
ccList = emailToAdd;
return null;
}
}

Can anyone help me to figure out when there no action on click of button?

 

Regards,

Manasa

Hi,

 

I have a jar file with me which contains a HTML Page. I need to call this html page in my VF page.

I know i can access this HTML Page, if i upload this jar file as Static resource. But, my jar file is more than 5MB hence i cant upload into static resource.

So i am planning to load the jar as Document or attachment and call the HTML page from there.

I want to know if this is possible

I tried to do something like below

Controller class:

 

public withsharingclasscompareOrgController {

 

publicblob docblob{get;set;}

 

public string docblob1{get;set;}

 

public string docblob2{get;set;}

 

publiccompareOrgController(){

 

Document doc = [select id,body from document where id='015Z0000000DUze'];

 

Document doc1 = [select Url from document where id='015Z0000000DUze'];

 

system.debug('*****'+doc);

 

system.debug('*****'+doc1);

docblob=doc.Body;

docblob1 =doc.id;

docblob2= doc1.Url;

}

 

}

 

VF Page:

<apex:page controller="compareOrgController">
     <apex:outputLabel >{!docblob}</apex:outputLabel>
    <apex:outputLink > {!docblob2}</apex:outputLink>
</apex:page>

 

Kindly help me on how this can be achieved.

If not Document is there any other way that i can upload my jar and access the HTML page?

 

 

Hello all,

 

I have a small question here on how to send an email(with specific template) when a button is clicked.

 

Could anybody please help me out doing the following:

 

1. Create a button "Send Email" on opportunity page. 

2. when the button is clicked, an email should be sent to the contact related to that opportunity with a specific email template.

 

 Any small pointers how to do this will be appreciated.

 

Thanks a lot! 

  • December 06, 2009
  • Like
  • 0