function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
shinerajbshinerajb 

How to set the first page?

Hai,

 

 

I have a package containing my pages and controllers,How do I set my first page of my application,from this?

 

Shine

RajiiiRajiii

 

 First you have to create app( Setup->Create->Apps), then you choose what are the tabs you need from available tabs to Selected tabs. After that you should choose the Default Landing tab( This is one is the actual landing tab of your application).

 

 

If my solution is solved your problem mark it as resolved, it will helpful for others.

Thanks

 

shinerajbshinerajb

Thats ok how do i attach a page that is created by me to the tab

Regards

Shine

RajiiiRajiii

 

Before you create package, you have to create visualforce tab(Setup->Create->tabs->Create new visualforce Tabs) and assign such tab is default landing tab in your app.

shinerajbshinerajb

Hai,

 

I created like that,then how can i publish this application in salesforce  Application Exchanger

RajiiiRajiii

Here the hints about Product release

       1. Test code coverage should be min 75%(You should use System.Assert(), System.Assertequals() with in the test methods)

      2. Using Cross site(XSS) scripting in the code(If you used get any values from URL)

      3. Make to publish your product, after that follow the app exchange instructions. (This process may take more than 3 weeks).

      4. After approval Salesforce team your product will be published.

 

 

If my solution is solved your problem mark it as resolved, it will helpful for others.

Thanks

 

shinerajbshinerajb

OK,One more problem i in my application.i have login validation page.it checks on loading some credentials.

and goes to a diffrent page using pagerefrence.but it is going to a refrence page but it shows the home page in a diifferent  application

 

Login default i have given in an app called DL. in that i redirected to another page .The message "You do not have a valid decisionlink login comes from that login.But it is standing in a diffrent application in "site.com"

RajiiiRajiii

 

You should redirect the same Login page using pageReference without hardcoding. Or otherwise could you give me exact scenario.

shinerajbshinerajb

Suppose there is a scenario in which my login is validated with an external database. if it is an valid i have to go to a diffrent page or otherwise i have to goto a diffrent page how do you handle this scenario

Shine

RajiiiRajiii

 

An external database in the sense? Have you used any webservice call?

 

And no problem to page redirect if you are used with in single apex controller.

shinerajbshinerajb

used an external webservice.So we cant use a page redirect there.

Shine

RajiiiRajiii

 

If you write login in Apex controller means you can redirect to whatever you want. if you write logic some external code means something you should return here(eg. yes or No). based on return value you can redirect page from here.

shinerajbshinerajb
that is working fine but the application tab in the application list is getting changed.and the tab is set as the default tab in the new application. and in the display region the correct messages are comming(the redirected page of my intented). only problem is that application in the application list gets changed.
RajiiiRajiii

 

Have you choose the your application in installed Salesforce environment.(Right side Top Corner) ?

shinerajbshinerajb

Exactly, i am trying to installed my application there only, But the issues is that the results are displaying on the home tab of another default applicatioin home page(like  sales home tab...)

RajiiiRajiii

 

Set here

Setup->Manage Users->Profile->Edit Which Profile you want -> Custom app Settings ->Choose your app as default

shinerajbshinerajb

Hi my problem is i have a new TAB called "login" i have a page called "login". in that i check whether that email user_id is valid by an external web service.if login is not validated i go to a differerent page called "EroorLogin" or if it is successfull i go to "SuccessLogin" pages. So wether i should include 3 pages in one tab while i create the tab.How do i handle this. What is happening is it goes to a different application. and the message in the display is coming correctly that of "EroorLogin" or "SuccessLogin"

 

 

REgards

Shine

shinerajbshinerajb

I want  2 pages under one tab,in my case,when I am clicking on my application,then the resulting page is coming under the home tab of some other default salesforce application.

 

 

******controller****

public class Login{

public PageReference redirect() {

PageReference pr;
Integer total_records;
String email_login;
email_login=UserInfo.getUserName();
Http httpProtocol ;
httpProtocol = new Http();
HttpRequest request;
request = new HttpRequest();
String endpoint ;
endpoint = 'http:///Services/validate_user_login.php?id='+email_login;
request.setEndPoint(endpoint);
request.setMethod('GET');
pr=Page.loginfailure;
HttpResponse response;
response = makeCallout(request);
JSONParser parser = JSON.createParser(response.getBody());

while (parser.nextToken() != null)
{
if ((parser.getCurrentToken() == JSONToken.FIELD_NAME) && (parser.getText() == 'total_records'))
{

parser.nextToken();

total_records=integer.valueof(parser.getText());

}

}

if( total_records>0)

{
return Page.welcome_login;
}
else
{
return Page.loginfailure;
}
}

}

 

***********welcome_login*******

<apex:page >
<h1> Welcome</h1>

</apex:page>

 

********loginfailure*****

<apex:page >

<br/>
<h1>
You do not have a valid account on <a id="theLink" name="theLink" href="https://mail.google.com/">www.gmail.co.in</a>. Please contact the folks at Decisionlink for further assistance</h1>

</apex:page>