• Gorky
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 6
    Replies

Hi,

 

I put a  Time-Dependent Workflow with the condition "1 Day Before Opportunity: Contract Start Date", then must send an email just a day before. It does, but also...if I modify the opportunity and the actual date if more than the "start date", another mail is sended, but it must not happpen.

 

Anyone knows how to manage this issue?

 

Thanks.

 

  • August 17, 2011
  • Like
  • 0
Hello,

When I try to consume a .NET WS  located on public IP 1.2.3.4  the system LOG returns

16:57:49 ERROR - Evaluation error: System.CalloutException: IO Exception: Read timed out
16:57:49 ERROR - Evaluation error: Class.Hello.Service1Soap.Hello: line 22, column 13 AnonymousBlock: line 2, column 17

It only happends when I try to attack this machine (IP 1.2.3.4). Other WS have worked correctly as for exemples on Apex Doc and other free acces WS.

Thanks.

  • November 13, 2008
  • Like
  • 0
I everyone!

I have created a new classes using Generate WSDL
and the example explained on the SF doc with the StrikeIron IP address lookup service.

Then I have created the stub class...(can be a method or a webservice too??), the same code that appears on the doc.

 class ..... Replicator(String args){
// Create the stub
     strikeironIplookup.DNSSoap dns = new strikeironIplookup.DNSSoap();
// Set up the license header
      dns.LicenseInfo = new strikeiron.LicenseInfo();
      dns.LicenseInfo.RegisteredUser = new strikeiron.RegisteredUser();
      dns.LicenseInfo.RegisteredUser.UserID = 'you@company.com';
      dns.LicenseInfo.RegisteredUser.Password = 'your-password';
// Make the Web service call
      strikeironIplookup.DNSInfo info = dns.DNSLookup('www.myname.com');

}


All compiles right. Now the question is... how can I consum this webservice from a S-Control?


I'd tried something like this ont he s-control
var result = sforce.apex.execute('tempuriOrg' , 'Replicator',{arg:"new Apex user!"} );
alert(result);
</script>


The call works don't work because a class problem. It seems to fails when at this line  of the class
strikeironIplookup.DNSInfo info = dns.DNSLookup('www.myname.com')

If I comment that line strikeironIplookup.DNSInfo info = dns.DNSLookup('www.myname.com'), and I put a return Strings, works and the string is returnet and printed out on the s-control.

The code on S-Control.
var result = sforce.apex.execute('tempuriOrg' , 'Replicator',{arg:"new Apex user!"} );
alert ('DEBUG 1 xx ');
alert('DEBUG 2 xx ');
alert(result);


Thanks!
  • November 11, 2008
  • Like
  • 0
Hi Everyone.

There's any way to consume a WebService and work whit its result?

Thanks.
  • November 10, 2008
  • Like
  • 0
Hi everybody,

I need to call from SF to a URL or WS and pass two parameters. The recipient application must check a pair of dates on his BBDD and then return a text and this text must be processed on SF, and then continue with the usual SF workflow.

I think the best method for doing that is using an S-CONTROL but  is there any other way to launch an S-CONTROL than clicking on a button?

This S-Control must be launched when a Opportunity changes to  'Closed Won'

I tried to do this with APEX, but as far as I know (i'm newb) APEX is asyncronous... so it seems not the useful for do what I wanna do.

Thanks!! :)
  • November 03, 2008
  • Like
  • 0
Hi everyone,

In a Layout Page when I want to set the default value there's a option to set this value with a object diferent from what appears on the select list "Select Field Type"?

Exemple.
I have the Layout "Hollydays" wich depends from "Users".
In "Hollydays" I have a Month Field. I want to set the default value of this field with the value of a field in Users object.

Is this possible? How?

Thank you.
  • October 21, 2008
  • Like
  • 0
Hi Everyone,


I'm trying to deploy my first Apex trigger to PRODUCTION but not pases the validation I only made the 69% of 75%.

I don't know what I'm missing.

First I check the user who's launched the trigger. Then if is not a administrator I call the method MyMethod in the class ThisClass, and I pass the values of the Orders table who has been changed.

The class is tested and is correctly deployed.

Thanks in advance.

The code --> :

trigger Order_UPDATE on Orders (before update) {

    string userrole = UserInfo.getUserRoleId(); --> Get UserRoleId
   
    if (userrole != 'Administrator'){   --> If is not administrator enter the IF
       
        Orders[] accs = Trigger.new; --> Get the values

        This_Class.MyMethod(accs);  --> Pass it to the method
   
    }

}

  • October 09, 2008
  • Like
  • 0
Hello Everybody,

I'm really newby whit Apex, this is my first testMethod and I'm stuck with this. Maybe anyone can help me?

The method I want to test called checkOrder waits for a Opportunity object who is sent by a call in a  before update trigger.
I try to simulate this on my testMethod but obviously I'm not doing this well 'cause in the call to checkIntranetOrder inside my test method the for condition never begins.

What I'm doing wrong? What is the way to simulate the pass of a Opportunity  object as sent by a trigger.new or trigger.old?

Thanks in advance

The code:

   public static testMethod void TestcheckIntranetOrder() {
        Opportunity[] lOp = [Select Id,Order__c from Opportunity where Id = '006R000000286W2']; --> Make a Opportunity whit the values I need
       
chekOrder(lOp); --> Call chekOrder Method
    }

    public static void checkOrder(Opportunity[] accs){
         for (Opportunity a:accs){            --> Want a opportunity 
             if (a.Order__c!=NULL){   
                 a.addError('Alert');
            }        
         }
     }
}
  • October 09, 2008
  • Like
  • 0
Hello everyone,

First of all I want to say I'm new with Force for Eclipse.

When i'm trying to test this class, Eclipse returns  'line not covered' warning.
I tried it on develop and it works, then when I want to pass the test in order to deploy it to production, all turns in a strange mess...
Why those warnings? Even if only leave the class with a simple method it returns warnings... Anyone can tel me what I'm doing wrong.

Thanks :)

... the code:


public class Test_Class {
  
     
      public static void checkOrderNumber(OpportunityLineItem[] accs){  --> Waits for a table results
         for (OpportunityLineItem a:accs){  --> For items on the table received...
            
             Opportunity[] lOp = [Select ID,OrderNumber__C from Opportunity where Id = :a.OpportunityId];  --> Select opportunity
           
            if (lOp[0].OrderNumber__C!='NULL'){  --> If Ordernumber is not NULL show alert
                a.addError('ALERT!!!');
            }   
         }
     }
     
     
}

  • October 08, 2008
  • Like
  • 0
Hi Everyone.

There's any way to consume a WebService and work whit its result?

Thanks.
  • November 10, 2008
  • Like
  • 0
Hi Everyone,


I'm trying to deploy my first Apex trigger to PRODUCTION but not pases the validation I only made the 69% of 75%.

I don't know what I'm missing.

First I check the user who's launched the trigger. Then if is not a administrator I call the method MyMethod in the class ThisClass, and I pass the values of the Orders table who has been changed.

The class is tested and is correctly deployed.

Thanks in advance.

The code --> :

trigger Order_UPDATE on Orders (before update) {

    string userrole = UserInfo.getUserRoleId(); --> Get UserRoleId
   
    if (userrole != 'Administrator'){   --> If is not administrator enter the IF
       
        Orders[] accs = Trigger.new; --> Get the values

        This_Class.MyMethod(accs);  --> Pass it to the method
   
    }

}

  • October 09, 2008
  • Like
  • 0
Hello Everybody,

I'm really newby whit Apex, this is my first testMethod and I'm stuck with this. Maybe anyone can help me?

The method I want to test called checkOrder waits for a Opportunity object who is sent by a call in a  before update trigger.
I try to simulate this on my testMethod but obviously I'm not doing this well 'cause in the call to checkIntranetOrder inside my test method the for condition never begins.

What I'm doing wrong? What is the way to simulate the pass of a Opportunity  object as sent by a trigger.new or trigger.old?

Thanks in advance

The code:

   public static testMethod void TestcheckIntranetOrder() {
        Opportunity[] lOp = [Select Id,Order__c from Opportunity where Id = '006R000000286W2']; --> Make a Opportunity whit the values I need
       
chekOrder(lOp); --> Call chekOrder Method
    }

    public static void checkOrder(Opportunity[] accs){
         for (Opportunity a:accs){            --> Want a opportunity 
             if (a.Order__c!=NULL){   
                 a.addError('Alert');
            }        
         }
     }
}
  • October 09, 2008
  • Like
  • 0
Hello everyone,

First of all I want to say I'm new with Force for Eclipse.

When i'm trying to test this class, Eclipse returns  'line not covered' warning.
I tried it on develop and it works, then when I want to pass the test in order to deploy it to production, all turns in a strange mess...
Why those warnings? Even if only leave the class with a simple method it returns warnings... Anyone can tel me what I'm doing wrong.

Thanks :)

... the code:


public class Test_Class {
  
     
      public static void checkOrderNumber(OpportunityLineItem[] accs){  --> Waits for a table results
         for (OpportunityLineItem a:accs){  --> For items on the table received...
            
             Opportunity[] lOp = [Select ID,OrderNumber__C from Opportunity where Id = :a.OpportunityId];  --> Select opportunity
           
            if (lOp[0].OrderNumber__C!='NULL'){  --> If Ordernumber is not NULL show alert
                a.addError('ALERT!!!');
            }   
         }
     }
     
     
}

  • October 08, 2008
  • Like
  • 0
I've read through the SSO doc provided by Salesforce ( http://blogs.salesforce.com/support/files/self_service_portal_with_sso.doc )

We are planning to use an iframe within our secure application to expose the self-serve portal.  The document shows that you simply pass the self-service users' credentials via a querystring however there is no ability to retreive the users' self-service password through Salesforce.  The only option is to generate a password and send to the user.

So bascially this Word doc makes it look like you don't need to access the API to do this type of integration.  From what I understand, I will actually have to do some type of integration and it's not as simple as this doc suggests.

Has anyone tried the approach in this document?