• Anusha
  • NEWBIE
  • 215 Points
  • Member since 2010

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

Here is my Code ...

 

<apex:page id="page" sidebar="false" controller="describe">
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-1.7.2.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-ui-1.8.20.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jqueryStable, '/css/cupertino/jquery-ui-1.8.20.custom.css')}"/>

<!-- <script>
$(function() {
$( ".dataCell" ).draggable();
});
</script>-->

<apex:form id="formid">
<apex:pageBlock title="Report Wizard" id="pb1">
<apex:pageBlocksection columns="3" id="pbs1" collapsible="true">
<apex:pageBlockSectionItem id="pbst1">
<apex:pageBlocktable value="{!fields}" var="da" >
<apex:column headerValue="Field" value="{!da}"/>
</apex:pageBlocktable>
</apex:pageBlockSectionItem>

</apex:pageBlock>
</apex:form>
</apex:page>

 

I have set up a VF page to replace the edit page for a custom object “CompetencyOwner__c”.  The object contains two fields “Region__c” and “Country__c” which I want to be able to let the user change with selectLists.  I have no problem building the selectOption values and making the Country values dependent on the selected Region. My problem is that I don’t understand how to set the default value of the dropdowns based on the current record values of those fields.

 

I have a getter method to return the list of selectList values to populate the dropdowns. I also have getter and setter methods for the current value of the selection. Here’s an example for the Region field:

 

  String selectedRegion;  //for selected value

 

    public List<selectOption> getRegions() {

        List<SelectOption> regionOps=new List<SelectOption>();

        List<Region__c> regionList=[Select Name from Region__c Order by Name];

        for(Region__c r:regionList) {

            regionOps.add(new SelectOption(r.ID,r.Name));

        }

        return regionOps;

    }

 

    public String getSelectedRegion() {

        return SelectedRegion;

    }

          

    public void setSelectedRegion(String SelectedRegion)  {

        this.SelectedRegion=SelectedRegion;

    }

 

Assume I can get the actual record to be edited. How do I set the initial value of the dropdown to the selectOption that corresponds to the record ID or Name?

Hello all,

   below is my question...please help me out in calling vf page after selecting one record from list... :

 

¢Create a VF page and VF component.
¢In the 1st page, get all the Opportunities in a <apex:selectList>.
¢On select of the Opportunity, go to the 2nd page where you can edit/save selected opportunity's StageName, Close Date.

 

 

I have a lookup field which i am displaying on the visual force page as an '<apex:selectlist/>'

Code is as below:

<apex:selectList id="CampName" value="{!CampaignName}" size="1" >
                  <apex:selectOptions value="{!Campaigns}"></apex:selectOptions>
 </apex:selectList>

In the apex class i am setting the values of the selectlist as below:

 public List<selectOption> getCampaigns()
    {
        List<selectOption> optionList = new List<selectOption>();
        optionList.add(new selectOption('', '- None -'));  
        for (Campaign__c a : [SELECT Id, name FROM Campaign__c where Status__c='Active' order by Name])
        {  
            optionList.add(new selectOption(a.Id, a.Name));  
        }
        return optionList;  
    }

Now suppose i have the campaign name as query paramenter to this visual force page and if i retrieve it as follows:

String strQueryString = ApexPages.CurrentPage().getParameters().get('Campaign');

 

how will i set this value in the strQueryString to the 'CampName' list selected value?

For e.g: If the Parameter has value 'Test' and i have a value in the  'CampName' list as 'Test' how will i show this value 'Test' as set in the list when the page gets loaded?

 

I have implemented paging in one of my VF pages that displays a list of events.  When the user clicks on one of the paging buttons, it maintains the screen position instead of going to the top of the page for the next series of records that are displayed.  How can I get the commandButton to move to the top of the page when clicked so the user is at the top of the screen to see the next set of records pulled up from the paging?

 

Here are my buttons:

 

<apex:commandButton id="first" value="First" action="{!first}" />
<apex:commandButton id="prev" value="Prev" action="{!previous}" rendered="{!hasPrevious}" />  
<apex:commandButton id="last" value="Last" action="{!last}" />
<apex:commandButton id="next" value="Next" action="{!next}" rendered="{!hasNext}" />

 Thanks.

I'm trying to invoke a Java applet located on my local machine from a VF page.  Is this possible?  How do I specify the Remote Site (I keep getting "cannot parse URL" when I use localhost for example)?

Can anyone explain how a CTI application will work in Salesforce ?

Thanks in advance
  • December 29, 2014
  • Like
  • 0

Hi friends,

Did anybody aware of trail orgs, I have a managed package and I need to show demos to clients in a trail org.

If anybody knows about it please provide some information.

 

Thanks

  • December 02, 2013
  • Like
  • 0

Hi friends,

I have a requiremnt like,

there are 2 objects

BR

CN

 

And CN has a Lookup relationship with BR

 

Each BR may have more than one CNs;

On BR object one of the field will have some logic like below,

1 OR (2 AND 3)

 

FYI,

1, 2 and 3 are the CN records say some condition records

each condition record will have 3 fields like below,

Field Name              Operator                      Value

Status                        equals                         New

 

Now I need to perform validations from Apex.

Can someone help me ?

Thanks in advance.

 

 

 

  • September 23, 2013
  • Like
  • 0

Hi,

I have a req like, I need to inset APEXPage from Code. 

Is there any way to do this............

 

I got one appExchage Product which inserting ApexPage in Class. here is that link 

http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016kP8EAI

 

Please help me.......

  • October 25, 2012
  • Like
  • 0

Hi,

I have a selectList, which displaying One,Two,three Values.

When i select "One", then some action has to perform. But onselect event is not working in SelectList.

 

I have written like this...

<apex:selectList id="sltOpn" value="{!PricingMethod}" onselect="alert('OnSelect Event');">

   <apex:selectoptions value="{!PricingMethodNames}"/>

 </apex:selectList>

 

when i select one of my option alert has to come, but its not coming..

 

Please help me..................!:smileysad:

 

regards

RB

 

  • August 18, 2011
  • Like
  • 0

Hi Guys...!

Hpoe all are doing well...

 

I have small Problem, 

I'm updateing the Object record in Class.

like below, I'm using sObject Instance to Update the record.

I'm assigning like below but Error was throwing.

sObj.Phone_No__c = '9999999999'; 

so i used like this, but same result.......... Error

sObj.get('Phone_No__c') = '9999999999';

update sObj;

 

And I'm getting Error like

" Field expression not allowed for generic SObject ".

 

 

 

 Now How can i update that perticular Record Phone No using sObject instance. 

 

and when I'm using Id then  no Error was throwing,

sObj.Id 



then No error

Please any body help me...........................

Hello Guys.........!,

 

In my VF page i need to perform Inline Editing in PageBlockTable. The PageBlockTable itself containing a repeat, in between repeat tags i kept OutPutField,  which i want to perform Inline Editing.

 

The repeat values are coming from a map which contains the Dynamic Fields. i.e., we don't know how many Fields we are getting from Custom Settings It's may be 2 or 3 or its may be 10.

 

I wrote the logic., but the InlieEditing was not supporting for this.

Hello Guys.........!,

 

In my VF page i need to perform Inline Editing in PageBlockTable. The PageBlockTable itself containing a repeat, in between repeat tags i kept OutPutField,  which i want to perform Inline Editing.

 

The repeat values are coming from a map which contains the Dynamic Fields. i.e., we don't know how many Fields we are getting from Custom Settings It's may be 2 or 3 or its may be 10.

 

I wrote the logic., but the InlieEditing was not supporting for this.

Please any body help me...........................

Hi Guys,

Could anybody explain, how to use Dynamic Visualforce Notation. Which is new feature in Summer11.

 

Regards 

Nagaboina

Hello Guys hope all are doing well,

I have a problem with Applet in VF Page, I'm trying to invoke the Applet from vf page, the following Exception is comming "java.lang.SecurityException: trusted loader attempted to load sandboxed resource from https://c.ap1.visual.force.com/apex/".

 

I make a jar file with all my java Classes & I uploaded that .JAR file to Static Resource from there i'm calling the Java Class.

And I make that jar file as Secured JAR file.

 

If anybody knows the solution,

Please Help me......

Regards

Nagaboina

Hello Everyone,

I Have a PageBlcok, and this pageBlock inheriting the Header Color from Custom Object Tab.

I have removed the color using mode attribute of pageBlock. Now, I need to give my Custom Color to PageBlcok, How can I do this.

Please don't tell, use tabIndex property... It's not my Requirement.

 

Thanks & Regards

RBC

Hi Guys,

I have a Issue that,

 

In button click I'm sending a Page(render as PDF) to email. If that PDF size is less than 4 MB. The Attachment namesis coming xzy.pdf

 

But when its take more size say 7 or 8 mb then, the attachment name is changed to xyz.pdf.html

 

Hello guys,

I have Created a Package in my DE. And when I'm trying to Install that Package in another DE it's not Installing. And in some DE's it's Installing.

I am unable to find why this is behaving like this.

Please Help me.

Hello Evryone,

I have a small issue that,

I need to insert the Records from a DataTable to my custom Object.

(i.e., there are 10 InputText Fields in a Datatable in my Page, Now I need to Insert these values to my Object )

 

I have written the properties for that inputText, But it taking the last entered value.

 

Please Help me...............

Thanks in Advance............

Hello,

 

How can use Rest API in my Salesforce Account....

Please anybody help me..............

I want to connect  with Java environment....................

 

And I Installed one Package called "Rest Explorer"  How can I Use that...........

Please give me a Quick Response

 

thanks

  • March 29, 2011
  • Like
  • 0

Hi guys,

 

How to use the Salesforce Knowledge & How to access the Articles Article Type Article Type Layout & Article Type Template

 

Please Help me out.............

 

Thanks & Regards 

Anusha R

  • March 23, 2011
  • Like
  • 0

Hi, 

is vmforce is under development..? 

and i have a samall issue regarding springs in springsource that,

 

initially for creating a vmforce app we need to develop that app in SpringSource IDE, here i'm getting problem, although it's a vmforce but initially to run that spring it has to reun on the local server called "vmserver"  But I'm nable find that server.

If anybody help me I'd be very thankfull to them..

 

thanks & regards

Anusha

  • March 17, 2011
  • Like
  • 0

Hello Guys,

I have issue with the vmforce,

initially for creating a vmforce app we need to develop that app in SpringSource IDE, here i'm getting problem, although it's a vmforce but initially to run that spring it has to reun on the local server called "vmserver"  But I'm nable find that server.

If anybody help me I'd be very thankfull to them..

 

thanks & regards

Anusha

  • March 17, 2011
  • Like
  • 0

Hi Guys,

I'm using Self-Service Portal, in that i have Closed the Case.

Now I want to reopen that Closed Case. Is there any possibility to do this.

 

Thanks & Regards

Anusha

  • March 11, 2011
  • Like
  • 0

Hello evryone,

 

i have a small issue that,

One of my reqirement is, I'm passing a Recod Id from page to Class using param, now using that record Id I need to find the Child Relations on the Object.

Please help me........................

  • March 09, 2011
  • Like
  • 0

Hi friends,

Did anybody aware of trail orgs, I have a managed package and I need to show demos to clients in a trail org.

If anybody knows about it please provide some information.

 

Thanks

  • December 02, 2013
  • Like
  • 0

Hi All,

       I have an image on my visualforce page (which is rendered as pdf as well). I want that image to redirect me to a link say : google  when it;s clicked. This redirection should also work when the page is rendered as pdf. This is what i have tried so far and itt doesnt work. Request you all to help.

 

    <script type="text/javascript">
    function popupwindow(){
        var newwindow = window.open("http://www.google.com/");
        newwindow.focus();
    }
    </script>

 

<apex:image url="{!$Resource.PDFImage}" onclick="popupwindow" width="550" height="50"/>

 

I  have also tried to use <a></a> tags , just outside <apex:image> but even that doesn't seem to work.

 

Regards

Shrey Tyagi

I have the below code where I have used if condition and wen i try to save it ,it throws the below error


Error: Syntax error


But when I remove the exclamatory mark before 'IF' it saves perfectly but the
condition is not satisfied.

I want the first window to open if the condition is true and the second if the condition is false.
Kindly help me

 

 

<apex:page showHeader="false" standardcontroller="Merchandise__c" extensions="callout1" wizard="true">


<apex:form >


<apex:pageBlock >
<apex:pageBlockButtons >
<apex:pageblockSection >
<apex:outputPanel id="panel">


<apex:commandButton value="Search" action="{!testing1}" rerender="panel" onclick="{!IF({!Merchandise__c.yoyo__c}!=null, 'window.open('/apex/twovalues?id={!idi}','','width=800,height=500')', 'alert('ShelfNo not available')')} "/>

<br/>

</apex:outputPanel>


</apex:pageblockSection></apex:pageBlockButtons> </apex:pageBlock>
</apex:form>
</apex:page>

 

 

Hi friends,

I have a requiremnt like,

there are 2 objects

BR

CN

 

And CN has a Lookup relationship with BR

 

Each BR may have more than one CNs;

On BR object one of the field will have some logic like below,

1 OR (2 AND 3)

 

FYI,

1, 2 and 3 are the CN records say some condition records

each condition record will have 3 fields like below,

Field Name              Operator                      Value

Status                        equals                         New

 

Now I need to perform validations from Apex.

Can someone help me ?

Thanks in advance.

 

 

 

  • September 23, 2013
  • Like
  • 0

How to find no of records in  a object using lookup relations?

Hi,

 

In me Lead object, I have created different list views.

I want to get all records of particular list view in VisualForce  page.

 

Please let me know, How can i get records from the list view of the object.

 

Thanks,

  • May 09, 2013
  • Like
  • 0

Hi All,

 

I have a trigger ( After Update). I want to write a test class for it. The idea is to send an Email to the concerned person upon modification of a note. Here Note is a lookup with Account. And an Account will have a contact. The email address is of the contact.

 

Code is :

Hi All,

I am facing one of the worst test class scenarios. I have a trigger ( After Update). The code is:

Trigger sendEmail on Note__c (after update)
{

 User pu;
 List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
 
 pu= [select u.Contact.Account.Rep1__r.Name,
 
 u.Contact.Account.Rep2__r.Name,
 u.Contact.Account.Rep1__r.Email,
 u.Contact.Account.Rep2__r.Email from User u where  u.id=:UserInfo.getUserId()]; 
 
 
 String Smail= pu.Contact.Account.Rep1__r.Email;
 String Imail= pu.Contact.Account.Rep2__r.Email;

 
 system.debug('Toaddress:'+Smail);

 
 List<User> listOfUser = [Select u.Name From User u WHERE Id=:Userinfo.getUserId() limit1];
 
 List<Note__c> nt = new List<Note__c>();

 nt = [select Note1__c,Note2__c from Note__c where id IN :Trigger.New];
 
  
 for(Note__c n : nt)
 {
 
  Note__c oldNote = Trigger.oldMap.get(n.ID);
 
  snew = n.Note1__c;
  sold = oldNote.Note1__c;
  inew = n.Note2__c;
  iold = oldNote.Note2__c;
 }

 
 for(User us:listofUser)
 {
    username=us.Name;
 }

    if(sold<>snew)
	{
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      String[] toAddresses = new String[] {Imail}; 
      mail.setSubject('Samsung Notes Modified');
      mail.setToAddresses(toAddresses);
    
      mail.setHTMLBody('The Email Body');
      Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     
     }
     
     
     
     }
}

 

 

Can anyone please help me with the test class? I have researched enough but I am not getting any coverage!

 

Hi 

I am customize a home page component but it is not working like standard home tabs like " Create New"  

 

my component HTML code is 

<iframe height="60px" src="/apex/search" width="90%" scrolling ="no" frameborder="0"></iframe>

 

 

 

 

Hello,

Could anybody help. 

I have one field where I am populating the Value from User Table and saving inside one lookup field. 

In the controller when saving this value in Lookup Field its giving the error as :

"Error System.StringException: Invalid id:"

 

Regards

Kit

Can i use action and onclick attribute on command line apex component together?

Can anyone give me some examples?

 

 

Here is my Code ...

 

<apex:page id="page" sidebar="false" controller="describe">
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-1.7.2.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jqueryStable, '/js/jquery-ui-1.8.20.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jqueryStable, '/css/cupertino/jquery-ui-1.8.20.custom.css')}"/>

<!-- <script>
$(function() {
$( ".dataCell" ).draggable();
});
</script>-->

<apex:form id="formid">
<apex:pageBlock title="Report Wizard" id="pb1">
<apex:pageBlocksection columns="3" id="pbs1" collapsible="true">
<apex:pageBlockSectionItem id="pbst1">
<apex:pageBlocktable value="{!fields}" var="da" >
<apex:column headerValue="Field" value="{!da}"/>
</apex:pageBlocktable>
</apex:pageBlockSectionItem>

</apex:pageBlock>
</apex:form>
</apex:page>

 

I have set up a VF page to replace the edit page for a custom object “CompetencyOwner__c”.  The object contains two fields “Region__c” and “Country__c” which I want to be able to let the user change with selectLists.  I have no problem building the selectOption values and making the Country values dependent on the selected Region. My problem is that I don’t understand how to set the default value of the dropdowns based on the current record values of those fields.

 

I have a getter method to return the list of selectList values to populate the dropdowns. I also have getter and setter methods for the current value of the selection. Here’s an example for the Region field:

 

  String selectedRegion;  //for selected value

 

    public List<selectOption> getRegions() {

        List<SelectOption> regionOps=new List<SelectOption>();

        List<Region__c> regionList=[Select Name from Region__c Order by Name];

        for(Region__c r:regionList) {

            regionOps.add(new SelectOption(r.ID,r.Name));

        }

        return regionOps;

    }

 

    public String getSelectedRegion() {

        return SelectedRegion;

    }

          

    public void setSelectedRegion(String SelectedRegion)  {

        this.SelectedRegion=SelectedRegion;

    }

 

Assume I can get the actual record to be edited. How do I set the initial value of the dropdown to the selectOption that corresponds to the record ID or Name?

Hi There,

 

I have a requirement , I want to populate the Lookupfiled value in picklist value.

I was able to populate the lookup filed ID in picklist but not the the value of lookupfiled.

 

below is my trigger

 

trigger SyncPicklistFieldwithLookupField on OpportunityLineItem (before insert) {

list<OpportunityLineItem > oppSyncList=new list<OpportunityLineItem> ();

for(OpportunityLineItem  oppLineitem : trigger.new){

    if(oppLineitem.Product_Test__c!=null){
        system.debug('oppLineitem.Product_Test__c='+oppLineitem.Product_Test__c);
//PRODT_GROUP_NM__c is the pick list

        oppLineitem.PRODT_GROUP_NM__c=oppLineitem.Product_Test__c; // Product_Test__c is the lookup field

        

system.debug('oppLineitem.PRODT_GROUP_NM__c='+oppLineitem.PRODT_GROUP_NM__c);

        oppSyncList.add(oppLineitem);
        system.debug('oppSyncList='+oppSyncList);

    }

}
}

 

 

so how to populate look up filed value in pick list .

If any one know the solution please let me know.

Hi All , 

 

I have created a custom with javascript functionality and its working fine . I want when the same button is pressed twice or thrice  it should give alert message " Invalid action". I tried  using lot of things but its not working. I know it looks very easy but pls help me out in this issue. Below is the script:-

 

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

 

var leadstatus = '{!Lead.Status}';
if (leadstatus != "Z-Program Approved")
{
alert('An Elite Id cannot be assigned unless the Lead Status is equal Z-Program Approved');
}

else{

// Now calling the webservice to create a new Id 
var callback = "" + sforce.apex.execute("CreateliteId","createlite", {LeadId:"{!Lead.Id}"});

// If create and update was ok - just reload Lead page to see the id of the elite partner
if(callback == 'OK' ){

alert('The Elite Id has been assigned');
window.location.reload();
}

 

else{
alert('Error: ' + callback);
}}

The text does not align left it is always aligned center why?

<apex:outputField value="{!doc__c}" style="text-align:left" />

I have tried using a span without luck, any other ideas?

Hi,

 

My requirement is to integrate salesforce with Linkedin and to show the shared connection between two contacts in a VF Page.

 

I have done the first step and generated the oauth_token and  in the oauth_callback, i have given the URL of Site with a VF page and same controller.

 

So, i generated a URL in the code as

 

LinkedAuthUri='https://api.linkedin.com/uas/oauth/authenticate?oauth_token='+unAuthorisedToken+'&oauth_callback='+oauth_callback1+'';


It gives me the URL as

 

https://api.linkedin.com/uas/oauth/authenticate?oauth_token=968c26de-8423-49ff-bab2-94fcfed60f88&oauth_callback=https%3A%2F%2social95-developer-edition.ap1.force.comer

If user validate this by clicking the link, it takes him to the site which i gave in oauth_callback and in the URL i get

 

oauthVerifier and oauthToken .

 

 

 

 

My problem is to get the oauthVerifier and oauthToken from the URL  so that i can send it in the request again.

 

i tried using ApexPages.currentPage().getParameters().get('oauth_verifier');


but it is coming as null because when the user verfies it  and then it takes it to the site i gave in oauth_callback. the controller is not getting instantiated again.

 

 

Any suggestion would be helpful.

 

 

Thanks,

Vineet