• DSsaran
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hi every one,

 

       I wrote a code when page loads, which checks the todays date and time if today date is 9th nov and time is 12.30 pm the code returns null and do rest of the thing else if today is not 9th nov and time is not 12.30  pm it will return to an error message page displaying pleaseopen it on 9 th nov 12.30 pm  to 1 pm.

 

and here is my code.

 

<apex:page showHeader="false" controller="checkmailid" action="{!checkdate}">      

 

APex class 

public PageReference checkdate()
    {      
        PageReference pageRef;
        DateTime t = DateTime.now();        
        if('11-9-2009'!=t.month()+'-'+t.day()+'-'+t.year())//checks today date    
        {                        
            pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                                 
            pageRef.setRedirect(true);                    
            return pageRef;         
        }        
        else //if today date is equal to given date       
        {            
            if(t.Hour()==12)     //this checks if time is equal to 12.30 or not.      
            {                
                if(t.Minute()>=30 )                
                {                        
                    return null;                
                }                
                else                
                {                    
                    pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                                 
                    pageRef.setRedirect(true);                    
                    return pageRef;                 
                }            
            }            
            else            
            {                
                pageRef = new PageReference('http://free-12415f14c3a-124c73aaa62.force.com/registerfor/errormsg?error=dates');                             
                pageRef.setRedirect(true);                
                return pageRef;             
            }        
      }
        return null;
    }

 

when i wrote and tested it on developer edition its working perfectly and when i made it as a package and uploaded it to free edition this time  functionality is not working.

 

 

can any one know what is  wrong with it? why is it not workingin free edition public sites.

 

 

  • November 09, 2009
  • Like
  • 0

Hi,

 

I have done it in the past with c# web app, and also with java, but now I need to integrate SF API with c# application.

 

Where I am stuck is simply to add reference to my plain c# app to my organiration's sf api.

 

What are the steps to accomplish this?

 

Any help will be appreciated, I know it is probably very very simple unlike java, I may have a brain freeze...:) 

 

Thank you very much in advance