• FdeBergeyck
  • NEWBIE
  • 5 Points
  • Member since 2007

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

Dear all,

 

I'm trying to build a custom visualforce search engine. My issue is that when I query on objects with apex, apex returns all valid records independently of the user access rights. Is there a way to tell apex to only query on records the user has access to?

 

If it is not possible, does anyone have an idea how I can remove from the results all Accounts that the user cannot access? I tried with the AccountShare object, but the UserOrGroupId related list is to complex to use (sharing can be done manually, through role, groups, subordinated roles, etc.).

 

Thank you for your help!

 

François

Message Edited by FdeBergeyck on 08-11-2009 12:55 AM
Hello everybody,
 
I created a dashboard using Google visualization. I would like to add a button to the dashboard that renders it as a pdf. The problem is that when I add renderAs="pdf" in the page tag of the visualforce page that contains the Google visualization, it doesn't show the Google visualization dashboards in the pdf.
 
Does anybody have any idea  how I can generate a pdf from a visualforce page whith Google visualization inside it?
 
If it's not possible, does anybody knows how I can add a print button that will allow the user to print the visualforce page?
 
Thank you for your help!
 
François de Bergeyck
Hello,
 
Is there a way to access data through a parent child relationship without using a querry?
 
I have an object Vehicle__c where the field Driver__c is a lookup to a Contact. I would like to have the AccountId of that contact. I tried the following, but it returns always null (although the AccountId of that Contact is not null):
 

for(Vehicle__c vehicle : System.trigger.new){

System.debug('vehicle.Driver__r.AccountId = '+vehicle.Driver__r.AccountId);

}

Is there another way, or do I have to use a querry?

Thanks for your help,

François de Bergeyck

Hello,
 
Does anybody knows how you can remove a record from trigger.new before the insert? I tried with

System.Trigger.new.remove(i);

But I get the followin error message:

 
19:00:04 INFO - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/2006/08/apex"><soapenv:Body><soapenv:Fault><faultcode>sf:UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: An unexpected error occured. Please include this ErrorId if you contact support: 554952691-62</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
 
Thank you for your help
 
François de Bergeyck
Hello,
 
Does anyone know how I can modify the accounts that appears on a lookup pop-up?
 
I want to create a new change owner button for Leads such that my button does the same as the old one, but such that when somebody clicks on the lookup icon to select the new owner he only sees some specific users.
 
Does anyone have any ideas?
 
Thank you,
 
françois
hello,
 
I have a problem with the overriding of a new button, and was hoping that somebody could help me. When the user clicks on the new button, two fields (Dossier which is a lookup field to the account to which the object is linked and Affaire which is a text field) must be filled in automaticaly. I have done that by using the following code:
 
window.parent.location.href="{!URLFOR($Action.Note_Private__c.New, null, [CF00N20000001IEwa = Note_Private__c.Account__c, Name = $User.Affaire__c, saveURL=URLFOR($Request.retURL, null,null,true), retURL=URLFOR($Request.retURL, null,null,true), cancelURL=URLFOR($Request.retURL, null,null,true) ], true)}";
 
Where CF00N20000001IEwa is the name of the field Dossier, and Name is the name of the field Affaire. The two fields are filled in when a user clicks on new, but the field Dossier is not filled with the right entry: Note_Private__c.Account__c returns a concatenation of the title, the first name, and the last name (ex: Mrs Marijke de Wit), but not the name of the account. My question is then, is there a way to use a variable in the URLFOR string? Something like ...CF00N20000001IEwa ="+Account+"... ? Or is there another way to fill in that field? I have access to the the Id of the account with Note_Private__c.AccountId__c, but if I put that in the URLFOR string, it will fill the field with the Id, but it will not make a link with the right account.
 
I hope this makes sense...
 
Thank you very much for your time!
 
François
Hello,
 
I want to override the convert button (for leads). The problem is that when I try to update the IsConverted, ConvertedOpportunityId, ConvertedDate, ConvertedContactId, or ConvertedAccountId field, I get an error message that says that I have to check the security settings of those fields, and check whether it is read/write for my profile (but my profile is administrator). I get the same error message when I try to update the RelatedId field of a Group.  Do anybody have any idea how I can update those fields?

Thank you very much,

François

Hello,
 
I have a user access problem, and was wondering if someone could help me. Here is my problem:
I want to run an s-control that will be invoked by a standard user, but the s-control needs to get data that is only accessible to an administrator. I tried the following, but it doesn't work:
 

<HTML>

<head>

<script language="JavaScript">

sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_100}");

.......

function SearchAccount() {

        var loginResult = sforceClient.Login(abc@xyz.be, "psw");

..........

}

.........
</script>
...........
 
 
Thank you very much for your help!
 
François

Dear all,

 

I'm trying to build a custom visualforce search engine. My issue is that when I query on objects with apex, apex returns all valid records independently of the user access rights. Is there a way to tell apex to only query on records the user has access to?

 

If it is not possible, does anyone have an idea how I can remove from the results all Accounts that the user cannot access? I tried with the AccountShare object, but the UserOrGroupId related list is to complex to use (sharing can be done manually, through role, groups, subordinated roles, etc.).

 

Thank you for your help!

 

François

Message Edited by FdeBergeyck on 08-11-2009 12:55 AM
Hello,
 
Is there a way to access data through a parent child relationship without using a querry?
 
I have an object Vehicle__c where the field Driver__c is a lookup to a Contact. I would like to have the AccountId of that contact. I tried the following, but it returns always null (although the AccountId of that Contact is not null):
 

for(Vehicle__c vehicle : System.trigger.new){

System.debug('vehicle.Driver__r.AccountId = '+vehicle.Driver__r.AccountId);

}

Is there another way, or do I have to use a querry?

Thanks for your help,

François de Bergeyck

Hello,
 
Does anybody knows how you can remove a record from trigger.new before the insert? I tried with

System.Trigger.new.remove(i);

But I get the followin error message:

 
19:00:04 INFO - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/2006/08/apex"><soapenv:Body><soapenv:Fault><faultcode>sf:UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: An unexpected error occured. Please include this ErrorId if you contact support: 554952691-62</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
 
Thank you for your help
 
François de Bergeyck
Hello,
 
I want to override the convert button (for leads). The problem is that when I try to update the IsConverted, ConvertedOpportunityId, ConvertedDate, ConvertedContactId, or ConvertedAccountId field, I get an error message that says that I have to check the security settings of those fields, and check whether it is read/write for my profile (but my profile is administrator). I get the same error message when I try to update the RelatedId field of a Group.  Do anybody have any idea how I can update those fields?

Thank you very much,

François

Hello,
 
I have a user access problem, and was wondering if someone could help me. Here is my problem:
I want to run an s-control that will be invoked by a standard user, but the s-control needs to get data that is only accessible to an administrator. I tried the following, but it doesn't work:
 

<HTML>

<head>

<script language="JavaScript">

sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_100}");

.......

function SearchAccount() {

        var loginResult = sforceClient.Login(abc@xyz.be, "psw");

..........

}

.........
</script>
...........
 
 
Thank you very much for your help!
 
François