-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
11Questions
-
10Replies
@RestResource context switches to guest license when calling PageReference
Hi,
I've a RestResouce class with a bunch of methods.
A thrid party Java App is calling that class using a systemadmin profile user.
That's all fine for every method I've written.
Now I've one method that is using a PageReference to create a pdf.
When i take a look at the debug logs, the call to the page itself is done using the guest license, not the authorized user that is calling the rest service.
The log overview looks like:
myInterface SiteGuestuser Application Browser /apex/myDocument
ServiceAgent Api Unknwon /makeDocument
private static void makeDokument(RestRequest req, RestResponse res) { ... String uri = '/apex/' + pdfName + params; PageReference pdf = new PageReference(url); res.responseBody = pdf.getContent(); }
What is the missing piece to call the PageReference using the ServiceAgent user?
Thanks in advance.
Thorsten
-
- thorsten_d
- August 30, 2013
- Like
- 0
- Continue reading or reply
Encrypted field not shown in visualforce page when used in layout
Hi,
I've found a strange behavior when using encrypted fields in visual force pages.
My simple test page works fine when I call it directly via URL. The value is shown without the mask, since I've the permission.
<apex:page standardController="Contact"> <apex:outputField value="{!Contact.encryptedCustomerId__c}"/> </apex:page>
But when I use that page inside the Contact Layout, the value is shown masked.
In the real scenario I would like to use the encryptedCustomerId__c by a controller extension to look up the corresponding object.
Is this a bug or a feature?
Many thanks
Thorsten
-
- thorsten_d
- June 20, 2013
- Like
- 0
- Continue reading or reply
Custom Button on Idea Layout
Is ist possible to add a custom Button to the Idea Layout?
Thanks
Thorsten
-
- thorsten_d
- November 08, 2010
- Like
- 0
- Continue reading or reply
Approval Workflow Error after Deployment
I've deployed a standard approval workflow from my dev to prod org. Everything works fine on dev but on prod I get the following error:
Unable to Submit for Approval This record does not meet the entry criteria or initial submitters of any active approval processes. Please contact your administrator for assistance.
Any ideas?
regards
Thorsten
-
- thorsten_d
- March 30, 2008
- Like
- 0
- Continue reading or reply
-
- thorsten_d
- November 28, 2007
- Like
- 0
- Continue reading or reply
Problem calling a webservice
I've tried to call a webservice from inside my custom controller.
All I see, is that my webservice is not called. I do not get an error message.
When I try to call the same webservice from a custom button via AJAX it works.
My code looks like:
Code:
public PageReference doSomething() { MyServices.TestServiceHttpPort ws = new MyServices.TestServiceHttpPort(); ws.do('foo'); return null; }
-
- thorsten_d
- November 05, 2007
- Like
- 0
- Continue reading or reply
Problem calling a webservice
I've tried to call a webservice from inside my custom controller.
All I see, is that my webservice is not called. I do not get an error message.
When I try to call the same webservice from a custom button via AJAX it works.
My code looks like:
Code:
public PageReference doSomething() { MyServices.TestServiceHttpPort ws = new MyServices.TestServiceHttpPort(); ws.do('foo'); return null; }Any Ideas?
-
- thorsten_d
- November 05, 2007
- Like
- 0
- Continue reading or reply
DataTable rowIndex
I'm trying to write a master-detail relationship with 2 pages.
On Page 1 I want to have a table using the dataTable Tag.
Each row of column 1 should be rendered as link, calling a method on my custom controller.
The controller should return a PageReference pointing to the detail page.
But I don't know how to figure out which row was clicked.
Thanks /thorsten
-
- thorsten_d
- October 23, 2007
- Like
- 0
- Continue reading or reply
Ajax Proxy https certificate
I want to make a https get call via the ajax proxy.
The result is:
400 Unable to forward request due to: sun.security.validator.ValidatorException: No trusted certificate found
When I enter the URL in my browser I get the response without showing any certificate popup.
How can I check if my (root) certificate is supported by salesforce?
thanks,
thorsten
-
- thorsten_d
- September 13, 2007
- Like
- 0
- Continue reading or reply
SOA Webservice example
-
- thorsten_d
- September 05, 2007
- Like
- 0
- Continue reading or reply
Apex code UI interaction
is it possible to do some UI interaction from inside Apex Code?
I'd like to do the following:
- define a insert trigger, let's say for the Account object
- so dome business logic inside the trigger
- give some response to the user, for example open a "are you sure?" popup window
is there a way to do something like this?
/thorsten
-
- thorsten_d
- August 22, 2007
- Like
- 0
- Continue reading or reply
Problem calling a webservice
I've tried to call a webservice from inside my custom controller.
All I see, is that my webservice is not called. I do not get an error message.
When I try to call the same webservice from a custom button via AJAX it works.
My code looks like:
Code:
public PageReference doSomething() { MyServices.TestServiceHttpPort ws = new MyServices.TestServiceHttpPort(); ws.do('foo'); return null; }
- thorsten_d
- November 05, 2007
- Like
- 0
- Continue reading or reply
Problem calling a webservice
I've tried to call a webservice from inside my custom controller.
All I see, is that my webservice is not called. I do not get an error message.
When I try to call the same webservice from a custom button via AJAX it works.
My code looks like:
Code:
public PageReference doSomething() { MyServices.TestServiceHttpPort ws = new MyServices.TestServiceHttpPort(); ws.do('foo'); return null; }Any Ideas?
- thorsten_d
- November 05, 2007
- Like
- 0
- Continue reading or reply
Ajax Proxy https certificate
I want to make a https get call via the ajax proxy.
The result is:
400 Unable to forward request due to: sun.security.validator.ValidatorException: No trusted certificate found
When I enter the URL in my browser I get the response without showing any certificate popup.
How can I check if my (root) certificate is supported by salesforce?
thanks,
thorsten
- thorsten_d
- September 13, 2007
- Like
- 0
- Continue reading or reply
Please help me in writing After trigger
{
if((Trigger.isInsert) || (Trigger.isUpdate))
{
for (Contact c :trigger.new)
{
Contact[] OwnerId = [Select OwnerId from Contact where Id in :Trigger.new];
c.Email =[Select E_mail from User where Id =OwnerId[0]];}
}
}
}
}
- Vineeta
- August 29, 2007
- Like
- 0
- Continue reading or reply
Apex code UI interaction
is it possible to do some UI interaction from inside Apex Code?
I'd like to do the following:
- define a insert trigger, let's say for the Account object
- so dome business logic inside the trigger
- give some response to the user, for example open a "are you sure?" popup window
is there a way to do something like this?
/thorsten
- thorsten_d
- August 22, 2007
- Like
- 0
- Continue reading or reply