You need to sign in to do that
Don't have an account?

No access to an object JUST after creating it
Hi,
Our problem is quite simple but I'm puzzled:
- we have a class that uses With sharing
- it is used as a Customer portal user
- it creates a contact
- Directly afterwards if I try to retrieve the same contact, I get a QueryException
We have set up public sharing of the Contact object to public read/write and we have read/edit/create in the Customer portal profile for the Contact object.
Any idea?
Cheers,
Laurent
You are probably very right atorman. It seems that what we are trying to do is just impossible, which is quite funny as you need a contact to send an email.... I love this link between APEX and CRM objects >_<
We decided to remove with sharing on this controller as we didn't find any other solution.
Cheers
All Answers
Is the Contact being created successfully? Can you post the Query Exception message and the relevant Apex code snippet?
I thought the customer portal handled contacts differently so that unless the portal user is a super user, it can't see the contact and even then, it needs to be parented by the same account as the contact/user creating it.
You are probably very right atorman. It seems that what we are trying to do is just impossible, which is quite funny as you need a contact to send an email.... I love this link between APEX and CRM objects >_<
We decided to remove with sharing on this controller as we didn't find any other solution.
Cheers