• Eva DeLoriol
  • NEWBIE
  • 25 Points
  • Member since 2006
  • Sr Developer
  • Univar

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 13
    Replies
I have arequiremnt that i want to take a photo from vf page using mobile/tablet
Hello,

How can I show header on visual force page with google map in the page. Now if I try to set shoheader to true in <apex:page> tag it stops displaiyng the header.. Please if anyone can give any idea it will be great..

Hi, users want to see all Campaign Members for Contacts at an Account on the Account page in a related list. Makes sense.

So I need to link the Campaign Member object directly to the Account.

Here's my code - am not sure why it isn't working.

Oddly the system debug tells me the field Contact on the Campaign member is Null even though the Member is linked to a Contact via it.

 

Any help appreciated thanks!

 

trigger AccountCampaignMember on CampaignMember (after insert, after update)
{
    
    for (CampaignMember t : Trigger.new)
    {
       system.debug('camp memb id================'+t.id);
       system.debug('camp memb Contact================'+t.Contact);
       system.debug('camp memb ContactAccount================'+t.Contact.Account);

            if (t.Contact<> null)
{
If (t.Account__c==null){

                t.Account__c= t.Contact.AccountId;
            }
        }
    //update t;
}}

 

Hi All,

I have a custom button on VF page (say open), when clicking on the button the page should open in a new window; it is working when Development mode is on (checked) , when switched off the development mode the page is opening inline on VF page only. Any help is highly appreiciated.


<apex:pageblockButtons location="top">
            
    <apex:commandButton action="{!tOpen}" value="Open"/>
            
</apex:pageblockButtons>



 public PageReference tOpen(){  

        PageReference pref= new PageReference('/'+ tid +'?retURL=%2F'+cid);
        pref.setRedirect(true);
        return pref;
 
    }



Thanks a ton inadvance!

 

 

can someone point out what i am doing wrong, or what is the correct way to find if the picklist field contains any of the mentioned values.


Save error: Method does not exist or incorrect signature: [SET<String>].contains(String, String, String, String, String, String, String)

 

 

Schema.DescribeFieldResult F = Object__c.Picklist_Field__c.getDescribe();
List<Schema.PicklistEntry> P = F.getPicklistValues();

set<string> s1 = new set<string>();
for ( Schema.PicklistEntry p1: p){

s1.add(p1.getValue());

system.debug(s1);
}
if (Field1__c == 0) {


if (s1.contains('Support Calls- A','IT Help Desk-L1','IT Help Desk - L2','Support Calls- B','Support Calls- C','Support Calls- D')){    // this is where the error is

Total = a.otherField__c ;

}

 

Hi,

 

I am attempting to use the new $RemoteAction variable and Visualforce.remoting.Manager.invokeAction() function in the summer 12 release.

 

I have successfully used them to call a remote action function when that function takes a single argument as its input, e.g.


Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteController.test1Str}','1 argument', handleReturn,{escape: true});

 

I have methods currently working in salesforce which accept 0 and 2 or more arguments. The obvious way of calling these to me would be to simply include the arguments separated by commas as that is what is done with the current calls, e.g.

RemoteController.test0Str( handleReturn,{escape: true})

 would map to

Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteController.test0Str}', handleReturn,{escape: true});

 and likewise for 2 arguments:

RemoteController.test2Str('2','arguments',  handleReturn,{escape: true})
Visualforce.remoting.Manager.invokeAction('RemoteController.test2Str','2','arguments', handleReturn,{escape: true})

 But for these two cases I get the following logged to the JS console:

Visualforce Remoting: Parameter length does not match remote action parameters: expected 0 parameters, got
Visualforce Remoting: Parameter length does not match remote action parameters: expected 2 parameters, got  

 So it is clear that salesforce know what it is expecting, but it is not clear how I pass the arguments.

 

I have also attempted passing the arguments as an array ,e.g.

[]
['1 argument']
['2','arguments']

 and (in desparation) as a single object with the argument names as the parameter names! None of this works.

 

Has anyone had any success using remoting in this fashion? There is a gist of my code at https://gist.github.com/2713502.

 

Regards,

 

James

I'm trying to include related lists for Related Content and Content Deliveries on a VF page and I can't figure out their relationship names. I searched in the docs but couldn't find that info. Can someone help?

Where is that info (list of all standard relationship names) documented?

 

I tried the following and few other names without luck.

 

 

<apex:relatedList list="RelatedContent" />
<apex:relatedList list="Content" />
<apex:relatedList list="ContentDeliveries" />

 

 

Thanks much

Hi,

I need to put a custom related list on the account detail page and put the Hover link on the top of the page for the custom related list.

 

I was able to do the custom related list displayed on the bottom of the Account detail page wiring a standard controller extension and visula force page.

 

Now the problem is How do I place the Hover link on the top of the page for the custom list? I saw couple of threads for the above, but the hover links issue was never discussed?.

 

Can any one please guide me how can I do this.

 

Thank you.

I'm able to make Debug Log entries from (service-side) APEX code via System.debug() calls, and referring to Setup+Monitoring+Debug Logs+...
 
From using the various resources at my disposal, I understand that the following should accomplish the subject task:
Code:
<script type="text/javascript" src="/soap/ajax/8.0/connection.js"></script>

 
Code:
sforce.debug.trace=on;
if (sforce.debug.trace) { sforce.debug.log("This is the message inserted into the Debug Log.");}

Alas, this does not work as expected (and I suspect the referenced ajax level is downlevel also).
 
Thanks  in advance for any help you could provide to accomplish the desired task.

Hi,
 
I would like to add "Personal Tagging" or " Public Tagging" in visual force page layout.
 
Can it be possible? do we have any syntex or pageblock section or header section with Tagging enable?
 
 
Thanks in advance.
 
Hi there, I've created a public class called SponsorshipMaintenance that has a public method UpdateSponsorshipCountry. Looks like this:

public class SponsorshipMaintenance {
   
    public void UpdateSponsorshipCountry(List<Sponsorship__c> Sponsorships, List<Id> ChildIds){
          // .... some code here
   }

}

The class compiles with no errors. When I try to compile a trigger that has a call to the UpdateSponsorshipCountry method, I get the message "method does not exist or incorrect signature" on the line that calls the method. The trigger looks like this:

trigger SponsorshipSetCountry on Sponsorship__c (before insert, before update) {   
    //get list of sponsored child Ids of new sponsorships
    Id[] SponsoredKids = new Id[]{};
    for (Sponsorship__c spons : Trigger.new){
        SponsoredKids.add(spons.Child__c);   
    }
   
    //call method to set the correct country on the sponsorship objects
    SponsorshipMaintenance.UpdateSponsorshipCountry(Trigger.New,SponsoredKids); //this is the line that's generating the error. If I comment it out, the trigger compiles.
}

Any guidance would be most appreciated. Thank you!

Have ported the Mass Create Tasks freebie to 8.0 from ajax beta and would like to add the email notification option.  The ajax documentation seems to indicate that I don't need to create an EmailHeader instance, but rather just need to set

sforce.connection.triggerUserEmail=true;

before the task 'create' call. Is this the case? I assume something is missing, as it does not work. 
 
Any help would be greatly appreciated!!
 
p.s. - when done and with notification working, I will post this to appexchange, if anyone is looking for something similar