• rohit.mehta
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 18
    Replies

Hello,

 

1. I created a Customer Portal, enabled login/self registration. Set the Default New User License to "Platform Portal" and the Default New User Profile to "Authenticated Website".

 

2. Created a Site and enabled login with the Customer Portal.

 

3. I am able to register a new user through the SiteRegister VF page but am not able to login. I have tried resetting password/ creating new users but cannot login. I get the following error -

"Your login attempt has failed. Make sure the username and password are correct".

 

I checked the user created from self registration and it all looks fine.

 

4. I then tried to login into the Customer Portal by using the login url of the Customer Portal. I get the following error - 

"The maximum number of logins has been exceeded. Please contact your administrator for more information."

I tried to reset the password and try again but the same issue.

 

5. The only place I can login in from is the Contact record - "Login As Portal User"

 

Can someone help me with why I am not able to login from Sites.

 

Thanks

Ro

Hello,

 

I have a custom VF page and controller. The controller is declared as 

 

 

public with sharing class MyCustomController {

The user accessing this page is a Partner user and does not have "Edit" Permissions on Leads but is still able to assign leads to other users.

 

I also tried assigning leads to a user who does not have "Read" permission on leads and that also surprising worked.

 

As per my understanding if I declare the class with the "with sharing" keyword, it should take into account the user permission.

 

Can someone explain why the "with sharing" is not having any effect.

 

Thanks,

Rohit

 

 

Hello,

 

I have a requirement where on certain workflow rules I want to send out an email in the contacts preferred language.

Is there a way to create multi lingual visual force email templates  ?

 

If not what is the best approach to acheive this?

 

Thanks,

Rohit

Hi all,

I'd like to dynamically  render an Sobject to a VF page.

Here is my controller:

Code:
private list<SObject> obj;

public void setobj(list<SObject> s){obj=s;} public list<Sobject> getobj(){return obj;}
public PageReference init() {
 obj=[select Name from Account limit 10]; return null; }

Here my VF Page:

Code:
<apex:page Controller="Test" action="{!init}">
<apex:form>
<apex:repeat value="{!obj}" var="field">
   <apex:inputField value="{!field.Name}"/>
</apex:repeat>
</apex:form>
</apex:page>

I've got this error message :
Read access not found for null.
I've also tried with outputText, inputText with no success.The only field I've managed to retrieve is the ID.

Any Idea ?



Hello,

Is it possible to query Reports and retrieve its Id. Something like...

Code:
Select Id from Report where name='MyReportName';

 
I have a requirement where I want to redirect the user to a Report from my SControl. I dont see any Report object in the salesforce schema.

Thanks,
Rohit
Hi,

I have a PRM enabled org. I have an afterUpdate trigger on Opportunity. In the code, I am doing this -

Code:
//get the opp fields  
Set<Id> oppIds = new Set<Id>();
for (Opportunity opp : Trigger.new) {
oppIds.add(opp.Id);
}

Map<Id, Opportunity> opportunityMap = new Map<Id, Opportunity>(
[Select Id, partnerAccountId, isClosed, isWon, Partner_Amount__c,
closeDate from Opportunity where Id In :oppIds]);

 Now when I do this

Code:
for (Opportunity o : Trigger.new) {
Opportunity opp = opportunityMap.get(o.Id);

if (opp.partnerAccountId != null) {

It works fine when I do this within Salesforce, but we have a quoting tool - QuoteWerks, which also updates opportunities. This tool throws a Null pointer exception - Attempt to de-reference a null object on this line -
opp.partnerAccountId != null

Any ideas why this would happen.

Thanks,
Rohit
 



I have set up a customer portal and now want to have Single sign on to it from our company website .. I am really struggling with this as I can see "Is SSO enabled" in a normal users profile under General User Permissions but there does not seem to be anywhere to set it in a Portal user's profile .. I've had our web developer review all the Wiki entries and it all makes perfect sense apart from the bit about "make sure the portal user profile has "Is Single-sign-on enabled" checked and you are using the correct login URLs."
 
Has anyone already set this up and could give me some direction?
 
Jaz
Hi,

I want to be able to get all the fields for the Opportunity. I am writing custom code for cloning an opportunity.
I had the following piece of code which was working but suddenly has stopped working.

Code:
        Map<String, Schema.SObjectField> m = Schema.SObjectType.Opportunity.fields.getMap();
        System.debug('isEmpty = ' + m.isEmpty());

This now returns an empty map.
Any ideas why this call would return an empty map.

Thanks,
Rohit

With the 10000 record limit on SOQL queries, is that per SOQL call in an Apex class or is it the sum of all calls in that class?  So if I had 5 queries, the total of those 5 must not exceed 10k?

Also, if all I'm doing is an SOQL count() .. how can I count all the records if it exceeds 10k?  Example please.  Thanks.
Hello,
 
I have a requirement to retrieve all the email templates from the user's 'My Personal Email Templates' folder.
 
Is there a way to programatically retrieve this information?
 
 
Thanks,
Rohit
Hi,
 
Is there a way to programatically use the letterhead in sendmail api.
I cannot use the template as the email contains references to  multiple objects and have to create the email in my apex code.
 
I still need to retrieve the letterhead specified in an email template and use that programatically to send the mail.
 
 
 
thanks,
Rohit
Hi,

I used try and catch statements in Controller extension to catch DML errors.

How can I disply the error message ? I know that I can get the message from e.getMessage() where "e" is the exception.
But  how do I display it on the current page . I tried using ApexPages but cud not succeed.

Thanks in advance!

Sirisha
I have a query where I want to use the NEXT_N_DAYS in my query but the problem is that the number of days is a variable in my code.
 
When I try writing as
 
Code:
Integer mydays = 20;
Select Id from Opportunity where CloseDate = NEXT_N_DAYS:mydays 

 
I get an error "Expecting a number, found mydays". I have tried the following variations but none of them work -
 
Code:
NEXT_N_DAYS::mydays 
NEXT_N_DAYS:mydays 
NEXT_N_DAYS: =:mydays 

How do I do this?

Thanks,
Rohit
I keep getting this error time and again when I do a query from a SControl
 
"SOAPAction HTTP header missing".
 
There is no pattern...sometimes it comes and the next time it works fine.
 
Any help is appreciated.
 
Thanks
Rohit
I get this error in SControl at times. It is not consistent and comes while doing a query or maybe while doing a update/create.

The error message is
{faultcode:'soapenv:Client', faultstring:'SOAPAction HTTP header missing',}

I am using the 10.0 api.

Any help is appreciated.

Thanks
Rohit