• thorsten_d
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 10
    Replies

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

 

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

 

Is ist possible to add a custom Button to the Idea Layout?

 

Thanks

Thorsten

    Hi,

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:

Code:
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. 

 
I've also checked the user and role settings. They seem to be ok.
Any ideas?

regards
Thorsten
    Hi,

is it possible to put data into the session scope?

Hi,
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;
}

 

Hi,
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?

 

Hi,
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
Hi,

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
Hi,
I've a question regarding the SOA video shown here http://adnsandbox.com/media/soasoa/
 
I'am wondering how to get the results from the webservice and put in into the custom fields on the account mask.
Could you please post the code behind the "Integrate Accounts" button?
 
Thanks
/thorsten
Hi,
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
Hi,
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;
}

 

Hi,
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?

 

Hi,

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
Hi Friends
I want to write a trigger on contact for "After Insert" and "After Update" to get email Id and ContactOwner and insert into Contact Email field.
I have written this code
 
trigger MyContactTrigger on Contact (after insert , after update) {
if(Trigger.isAfter)
{
 if((Trigger.isInsert) || (Trigger.isUpdate))
 {
  for (Contact c :trigger.new)
  {
                    Contact[] OwnerId = [Select OwnerId from Contact where Id in :Trigger.new];
            for(Integer i=0;i<OwnerId.length;i++){
 c.Email =[Select E_mail from User where Id =OwnerId[0]];}
                    }
          }
}
}
 
I have found Compile Error: unexpected token:.
 
Please let me know how to write this trigger.
 
Pseudocode Is like this:
 
get OwnerId from Contact
Get Email from User where Id=c.OwnerId
c.email =Email
 
Thanks
Vineeta
 
Hi,
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