• sahari
  • NEWBIE
  • 80 Points
  • Member since 2010

  • Chatter
    Feed
  • 3
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 61
    Replies

Hi,

Is it possible to hide the home tab in Sites? or atleast can we change its name? Or atleast change the tab color?? Many thanks.

Is there any easy way to disable portal users through any api calls ? I am trying to delete contact in bulk, but they are all portal contacts. I am unable to delete them unless I manually disable the portal users associated with these contacts . 

 

I wonder if there is any other easy way to do it?

 

  • August 08, 2012
  • Like
  • 0

Hi.

 

Can a cookie be set from a vf page other than the page where I actually want to access it? I have two visual force pages. PageA and PageB.

 

Where PageA is the home page and PageB is where I am actually computing some value and want to set that value as cookie on Page A.

 

I could set the cookie and read it from PageB but when I am trying to read the same cookie from pageA, ot shows null value. 

Here is the code snippet of what I am trying to do...

In pageB:

 

//Setting the cookie

 

 

 Cookie ck =  new Cookie('newcounter',newcounterval,null,360,false);
        List<Cookie> ls = new List<cookie>();
        ls.add(ck);
        pagereference pg = new pagereference('/apex/managecampstest');
        pg.setCookies(ls);

 

 Cookie ck =  new Cookie('newcounter',newcounterval,null,360,false);

  List<Cookie> ls = new List<cookie>(); 

  ls.add(ck); 

 

  pagereference pg = new pagereference('/apex/PageA'); 

  pg.setCookies(ls);

 

//Reading the cookie from PageB:

 

 

Cookie cook = pg.getCookies().get('newcounter');

        System.debug('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ cookie value'+ cook);  //displays the correct cookie value

 

 

In page A

 

 Cookie counter = ApexPages.currentPage().getCookies().get('newcounter');
    cookievalue = String.valueOf(counter.getValue());//displays null here

 

Tried this as well:

 

 pagereference pg = new pagereference('/apex/PageA');
    Cookie cook = pg.getCookies().get('newcounter');
        System.debug('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ cookie value'+ cook); // displays null here as well

 

Any help is greatly appreciated.

 

 

  • November 01, 2010
  • Like
  • 2

Hi

 

I have an urgent requirement to implement calender in  vf page. When user clicks on a particular date, it should list out all the events hosted on that day. Pretty much the standard functionality.

 

I could'nt find any way to do this.

I would really appreciate if someone could post me the logic to achieve this functionality.

 

Thanks in advance

  • September 12, 2010
  • Like
  • 0

Hi guys,

 

I have a requirement, I need to display a vf page inside the content of a tab?

Any ideas as to how to achieve this?

 

Thanks in advance.

  • August 31, 2010
  • Like
  • 0

I have a Vs page that tracks Planes on the Google earth. 

The users would like to have it open all day.

So I need to keep this page refreshing every 5 min or so.

 

Does anyone have an idea as to how to achieve this functionality? Any help would be greatly appreciated.

Thanks in advance.

  • August 30, 2010
  • Like
  • 0

I have a developed a vf page which has a form in it. And when ever the user does not fill teh reqd fields. the page is getting reloaded. So I added

<apex:pageMessages>

 

Now I get the error msg displayed on the page top. But this msg is not user understandable. How can I customize this error or just print a neat msg./? I have tried

ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Email is required field'));  this in the associated class. But I still the get the same following msg.

 

Any help is greatly appreciated.

 

 
ERROR
Error: j_id0:j_id1:j_id52: Validation Error: Value is required.
  • August 20, 2010
  • Like
  • 0

Hi

Can we hide the from address for an email?

My scenario is.

When the Site guest users fill the online application form, they get a confirmation mail 

In this mail , the from Address shows as " No reply on behalf of Salesforce.com[site contact Email id here].

I managed to remove the " no reply on behalf os salesforce.com" but I still get the Site contact Email id in brackets.

Can we hide that address?

 

I also used setsenderdisplayname method. but only the display name changes and still I get the Site contact Email Address.

How can we have that removed.?

  • August 17, 2010
  • Like
  • 0

I have developed a site. I want to change the domain name of this site to be same as our actual website 

For eg.

My site domain name is : mycompany.force.com

and my website domain name is mycompany.com

So now I would like to change mycompany.force.com to mycompany.com

 

I tried to look into the Site URL rewriter class example, but I dint understand it clearly.

This example shows to rewrite the  path names

 

Please help and it will be great if you can give me some example codes

  • August 17, 2010
  • Like
  • 0

I developed a site and am using a favicon for it.

I uploaded a favicon (img/jpeg) in static resources .

Then I tried to lookup for this in the Site detail page. But it did'nt work. 

So I used

<link rel="icon" type="image/png" href="{!$resource.favicon}"/>

 

But this time, it works in all browsers except IE.

Can anybody help me on this please.

  • August 16, 2010
  • Like
  • 0

Hi

 

I have created a form in which the onclick event of a save button does a page redirect. But this page redirection works fine in Chrome and Firefox but does not work in IE.

Authorization required error page is being displayed.

Any ideas please?

 

Thanks in Advance.

 

  • August 05, 2010
  • Like
  • 0

Hi

 

I need to have a background image for a pageblock table.

But I see we cannot include a style class for a page block table.

Is there any work around for this?

Any help is greatly appreciated.

Hi

 

I have a requirement to monitor all the users login hours. Everyday, the first time they login to salesforce, I need to record their timings. 

Does any one have an idea on this?

 

Thanks for any help!

Hi. I am able to display all the attachments related to a customer portal user. But the problem is that, when user clicks on that attachment link to download, it says INSUFFICIENT PREVILIGES. Here is what I am using .

 

<a href="{!URLFOR($Action.Attachment.Download, att.id)}" >{!att.name}</a>

 

<a href="{!URLFOR($Action.Attachment.Download, att.id)}" >{!att.name}</a>

 

But the same works in a normal vf page that is for a normal contact withoutr any authentication.

 

Thanks for any help.

does any one knoiw how to make custom objects available for a customer portal user Profile?

 

I inquired with the salesforce support and they told me it is not possible. But I went through lot of forums that talked about custom objects and the customer portal user profiles.

have anyone of you has a workaround. please share.

 

Hi

 

I have a requirement that, the customer portal users create tasks or send emails to the regular users.

But I believe that the portal users cannot create tasks. But I am not sure why the emails don't work.

Does anyone know a workaround for this?

 

Any help is greatly appreciated!

Thanks

Hi

 

I am looking for an oppurtunity to work as an intern/fresher on salesforce project. If you know of any oppurtunity like this, Please let me know . I am open to relocation and am also willing to work as a volunteer.

 

Thanks in Advance,

 

  • April 17, 2010
  • Like
  • 0

Hi.

 

Can a cookie be set from a vf page other than the page where I actually want to access it? I have two visual force pages. PageA and PageB.

 

Where PageA is the home page and PageB is where I am actually computing some value and want to set that value as cookie on Page A.

 

I could set the cookie and read it from PageB but when I am trying to read the same cookie from pageA, ot shows null value. 

Here is the code snippet of what I am trying to do...

In pageB:

 

//Setting the cookie

 

 

 Cookie ck =  new Cookie('newcounter',newcounterval,null,360,false);
        List<Cookie> ls = new List<cookie>();
        ls.add(ck);
        pagereference pg = new pagereference('/apex/managecampstest');
        pg.setCookies(ls);

 

 Cookie ck =  new Cookie('newcounter',newcounterval,null,360,false);

  List<Cookie> ls = new List<cookie>(); 

  ls.add(ck); 

 

  pagereference pg = new pagereference('/apex/PageA'); 

  pg.setCookies(ls);

 

//Reading the cookie from PageB:

 

 

Cookie cook = pg.getCookies().get('newcounter');

        System.debug('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ cookie value'+ cook);  //displays the correct cookie value

 

 

In page A

 

 Cookie counter = ApexPages.currentPage().getCookies().get('newcounter');
    cookievalue = String.valueOf(counter.getValue());//displays null here

 

Tried this as well:

 

 pagereference pg = new pagereference('/apex/PageA');
    Cookie cook = pg.getCookies().get('newcounter');
        System.debug('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ cookie value'+ cook); // displays null here as well

 

Any help is greatly appreciated.

 

 

  • November 01, 2010
  • Like
  • 2
I'd like to create an Apex Class that finds any 'Case_Resource__c' (Custom Object) where the following critera are met ont his object:
UOM__c = 'mo.'
Active__c = 'true'
For all Case_Resource__c records that are found matching those criteria, I'd like to create a new 'TimeSlip__c' (Custom Object) record.

The new TimeSlip__c record should map some data points from the Case_Resource__c record:
(Case Resource) Case__c should be mapped to the new (TimeSlip) Case__c
Case_Resource_ID should be mapped to the new (TimeSlip) Case_Resource_ID__c

The new TimeSlip__c record should also be created with this static value:
(TimeSlip) Total_Time__c = '1'

The result should be all Case_Resource__c records that are active and uom = mo. would then have a corresponding TimeSlip containing the matching Case, Case Resource ID, and a value of 1 in the Total Time field.

  • September 11, 2014
  • Like
  • 0
Hello,

I created the trigger below to create a new Opportunity when an existing Opportunity reaches the Closed Won stage.  I have 2 issues.

1)  On the line where I create the new Opportunity's name, the Account Name from the previous Opportunity is not coiming through.

2)  The trigger is actually creating 4 Opportunities instead of just 1.

Does anyone know how to fix these?  Thanks,


// Automatically create an open renewal Opportunity
trigger RenewalOpp on Opportunity(after update) {


  List<Opportunity> newOpp = new List<Opportunity>();
  
  for (Opportunity opp : Trigger.new) {
  
  IF(opp.StageName == 'Closed Won'){
  
    Opportunity renewalOpp = opp.clone(false);
    renewalOpp.Name = opp.Account + ' - Renewal (' +opp.Renewal_Date_Year__c + ')';
    renewalOpp.StageName   = 'Active Discussions';
    renewalOpp.CloseDate   = opp.Renewal_Date_Next__c;
    renewalOpp.Amount = opp.Amount;
    renewalOpp.Effective_Date__c  = opp.Renewal_Date_Next__c;
    renewalOpp.Renewal__c = 'Yes';
    renewalOpp.Renewed_Opportunity__c = opp.Id;
    renewalOpp.Probability = 5;
    
    newOpp.add(renewalOpp);
  }
  }
  IF(newOpp.size() > 0)
  insert newOpp;

}


Force.com developer/admin needed for a full time position near Raleigh, NC. 

 

This position will act as a process and application developer working with the business internally, learning business processes and developing force.com apps to support those processes. Get to work with some awesome people and break new ground on huge process development improvements!

 

Note that we are looking for an FTE, not a consulting partner.

Hi

 

I have an urgent requirement to implement calender in  vf page. When user clicks on a particular date, it should list out all the events hosted on that day. Pretty much the standard functionality.

 

I could'nt find any way to do this.

I would really appreciate if someone could post me the logic to achieve this functionality.

 

Thanks in advance

  • September 12, 2010
  • Like
  • 0

Hello - fairly new at Portal so hopefully this is an easy answer but I can't seem to figure it out. I have my Site connected to a Customer Portal for authenticated login but I cannot figure out how to get the login page to redirect to the homepage of the Customer Portal which is not a VisualForce page - it's just plan old portal. Is there a way to easily do this? Am I just missing something? 

  • September 03, 2010
  • Like
  • 0

Hi guys,

 

I have a requirement, I need to display a vf page inside the content of a tab?

Any ideas as to how to achieve this?

 

Thanks in advance.

  • August 31, 2010
  • Like
  • 0

I have a Vs page that tracks Planes on the Google earth. 

The users would like to have it open all day.

So I need to keep this page refreshing every 5 min or so.

 

Does anyone have an idea as to how to achieve this functionality? Any help would be greatly appreciated.

Thanks in advance.

  • August 30, 2010
  • Like
  • 0

Hi

Can we hide the from address for an email?

My scenario is.

When the Site guest users fill the online application form, they get a confirmation mail 

In this mail , the from Address shows as " No reply on behalf of Salesforce.com[site contact Email id here].

I managed to remove the " no reply on behalf os salesforce.com" but I still get the Site contact Email id in brackets.

Can we hide that address?

 

I also used setsenderdisplayname method. but only the display name changes and still I get the Site contact Email Address.

How can we have that removed.?

  • August 17, 2010
  • Like
  • 0

I have developed a site. I want to change the domain name of this site to be same as our actual website 

For eg.

My site domain name is : mycompany.force.com

and my website domain name is mycompany.com

So now I would like to change mycompany.force.com to mycompany.com

 

I tried to look into the Site URL rewriter class example, but I dint understand it clearly.

This example shows to rewrite the  path names

 

Please help and it will be great if you can give me some example codes

  • August 17, 2010
  • Like
  • 0

I developed a site and am using a favicon for it.

I uploaded a favicon (img/jpeg) in static resources .

Then I tried to lookup for this in the Site detail page. But it did'nt work. 

So I used

<link rel="icon" type="image/png" href="{!$resource.favicon}"/>

 

But this time, it works in all browsers except IE.

Can anybody help me on this please.

  • August 16, 2010
  • Like
  • 0

Hi guys.

 

Bit of a conundrum here...

 

I've got a VF page that has an inputText field that users use to scan in barcodes using a handheld barcode scanner.

The barcode scanner merely act like a keyboard: it translates the scan to keys, then types those keys and hits enter.

 

What I'd like to do, is have users scan a barcode, then conduct an apex query. If the results are good, it updates a record, if the results are bad - it throws a pageMessage.

 

I got some JS that checks when the enter key is hit, and then I envoke the apex. However, there seems to be an issue with the sequence of reRendering and apex, and JS.

 

When I do the scan into the input field - the page does a refresh - but the apex:PageMessage that should display does not...

 

Here's what I have so far:

 

 

<apex:page standardController="terminalPrepOrder__c" extensions="terminalPrepOrderController" >
<apex:variable var="prp" value="{!terminalPrepOrder__c}"/>

function checkEnter(e){ <!-- e is event object passed from function invocation -->
var characterCode <!--literal character code will be stored in this variable -->

if(e && e.which){ <!--if which property of event object is supported (NN4) -->
e = e
characterCode = e.which <!-- character code is contained in NN4's which property -->
}
else{
e = event
characterCode = e.keyCode <!-- character code is contained in IE's keyCode property -->
}

if(characterCode == 13){ <!-- if generated character code is equal to ascii 13 (if enter key) -->
alert("clicked enter");
otherFindTerminal(); <!-- submit the form -->
return false;
}
else{
return true
}
}
</script>

<apex:pageMessages id="msgs"/>
<apex:form id="theForm"> <apex:actionFunction name="findTerminal" action="{!otherFindTerminal}" reRender="msgs"/> <apex:outputText value="Scan Terminal Barcode "/> <apex:inputText value="{!searchBarcode}" onkeypress="checkEnter(event)"/> <apex:commandButton value="Find" action="{!otherFindTerminal}" id="hitMe" reRender="msgs"/> </apex:form>

 Controller:

 

	public PageReference otherFindTerminal() {  
        try {
            if (searchBarcode != '') {
              terminal__c enteredTrm = [select Id from Terminal__c T where T.barcodeNumber__c = :searchBarcode limit 1];        
           
             terminalPrepOrder__c trmPrp = (terminalPrepOrder__c) controller.getRecord();
           
             trmPrp.Terminal__c = enteredTrm.Id;
             update trmPrp;
            }
            else if (searchBarcode == '' ) {
                ApexPages.Message invalidSearch = new ApexPages.Message(ApexPages.Severity.ERROR, 'Invalid barcode.');
                ApexPages.addMessage(invalidSearch);
            }
        }
        catch (exception e) {
        
            ApexPages.Message noTrm = new ApexPages.Message(ApexPages.Severity.ERROR, searchBarcode + ' not found. Please enter the Terminal barcode.');
            ApexPages.addMessage(noTrm);
        }
        return null;
    }

 

 

 

So when I click the commandButton - it functions perfectly - It does the query, and rerenders the messages...

 

When I use the input field and hit enter... it refreshes the page but does nothing...

 

 

Please help!

Thanks

  • May 10, 2010
  • Like
  • 0

When you use apex:selectList or apex:inputText you get this nasty error message. Something like this:

 

 

I could live with this for internal apps but I am now working on a force.com site that will face customers and partners so this won't fly.

 

Is there anyway to clean this up? I have many other apex:inputFields with required set to true so I can't do inspection on the apex side to see if the field is null and then display a nice clean message as the requiredness of the other fields prevents the apex from executing.

 

Any ideas? Workarounds?

 

Thanks,

Jason

 

  • January 26, 2010
  • Like
  • 0

Hello,

 

I'm using Sites to authenticate and register new users. These users will be Customer Portal Users. I have been reading the Ron Hess article:  http://wiki.developerforce.com/index.php/Authenticating_Users_on_Force.com_Sites

 

it's great info.

 

I have issues to land into the correct Customer Portal Home page. Do you know how to achieve this?

 

Thanks, Javier. 

Hi,

 

I have a controller that passes a list of objects to visualforce page. On this page I have an apex:repeater that iterates over these objects, each object is placed in an apex: PageBlockSection, then in this pageblocksection, I bind each object(List of inner objects) to an apex: pageBlockTable, then in each row of these tables(one table per section) I have html input elements of type text that house some fields from the inner objects. 

 

When a change is a made in the row of the table I want to pass back to my controller the Id of that object, the field that was changed and the value of the field. 

 

The save button is unique for every row and there is a javascript function that handles the onlick event.

In this javascript save function I pretty much have the object id, the field name and the value from the text box, I just don't know how to pass these to my controller.  Any suggestion is welcomed.

 

More Info:

I tried using apex: param but because of how dynamic this page is the value in the param becomes stale pretty quick. 

 

I am currently using jquery so I would want to avoid using any other javascript framework.

 

 

 

Thanks

 

K

Hi,

 

I'm writing apex code which automates creation of a customer portal user.

First I create a new contact. Then I create a new user linked to that contact, with all required attributes to access the customer portal. It all works well except that I can't get the new password notification sent to the new user.

 

In other words, I can't find a way to "select" the "Generate new password and notify user immediately" option from apex.

 

Any hint would be highly appreciated!!!

 

Thanks,

 

  • February 14, 2009
  • Like
  • 0
I have created a custom Calendar page that is supposed to display event entries for the designated month/year for all users in my org (user count is about 30).  In my custom controller, I have the following SOQL:

Pseudo-Code:
Date sDate = {start date};
Date eDate = {end date};

events = [SELECT id, subject, description, location, activitydate, activitydatetime,
durationinminutes, isalldayevent, owner.name FROM Event WHERE activitydate >= :sDate AND activityDate <= :eDate ORDER BY activitydate, activitydatetime];

If I open the page as an Admin user, I retrieve all events for the date range for all users (as expected).  However, when logged in as a regular user and the page is first loaded, only the respective user's events are returned.

I would chalk this up as a permissions issue, but something odd happens when the user clicks on an apex:commandLink that changes the month in the controller.  When the link is clicked, all events for the date range for all users are returned.  It's almost as if the user needs to navigate to the next or previous month and then back to the current month in order for all events to show properly.

I have added System.debug statements to the code to verify that when the user initially opens the page, the event count reflects the number of events for that particular user for the current month.  However, when they navigate to a different month, the count reflects events for all users in the selected month.

Can someone explain why this would happen?


  • September 09, 2008
  • Like
  • 0