• 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 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