• saisai
  • NEWBIE
  • 0 Points
  • Member since 2013

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

If we want to fix a bug and we r in a screen and we need to find the classes & page that is using it.

How to find it.

Thanks

Sai

Here is my method for which Heap dump displays successfully:

 

public Set<Pair> getSet()
{
Set<Pair> pairsSet = new Set<Pair>();
System.Debug('Debug2');
Pair p1 = new Pair(1,'One');
Pair p2 = new Pair(2,'Two');
pairsSet.add(p1);
pairsSet.add(p2);
return pairsSet;
}

 

Here is a slightly modified method and the HD does not display:

 

This is what i type in Anonymous view:

Pair p = new Pair(1,"Sai");

p.getSetWithDups();

 

Here is the method:

 

public Set<Pair> getSetWithDups()
{
Set<Pair> pairsSet = new Set<Pair>();
System.Debug('Debug2');
Pair p1 = new Pair(1,'One');
p1.Name='Sai';
Pair p2 = new Pair(2,'Two');
p2.Name='Sai';
pairsSet.add(p1);
pairsSet.add(p2);
return pairsSet;
}

 

Please help if there r any suggestions.

Thanks

Sai

Just wondering if it is possible to debug using Dev Console.

 

Here is my class i have created and i have put a breakpoint at the last line of the method getList();

Then i have executed and it appears like it does not stop at the last line.

The heap dump just shows up with the objects initialized in it.

Is this the only way to debug?

 

public class Pair {
public Integer First {get; set;}
public String Second {get; set;}
public Pair(Integer first, String second)
{
this.First = first;
this.Second = second;
}
public List<Pair> getList()
{
List<Pair> pairs = new List<Pair>();
System.Debug('Debug1');
Pair p1 = new Pair(1,'One');
Pair p2 = new Pair(2,'Two');
pairs.add(p1);
pairs.add(p2);
return pairs;
}
}

I  have successfully created  a bugCase junc object by creating 2 relationships in the custom object and successfully see the related list called Bugs in Case and related list called Cases in Bug object.

Then i have successfully created a new case record from Cases tab.

Now when trying to create a new bug object by clicking on Bugs | New --> there r 2 lookups in this screen for Bug and have successfully selected from the Case lookup but when i click the lookup for Bug there r no records and only Go button is present but not the New button.

Then i have tried looking for Bug object in Customize but noticed it does not exist here also.

How to add a new Bug object.

Please help.

Thanks

Sai

I have created a new page and then i m try to override my account tab by navigating to:

Customize | Accounts | Buttons & Links | Standard Buttons & Links | Edit Accounts Tab | Override With | Visual Force Page

 

I cannot see my newly created page here.

However i see it in :

Setup | Develop | Pages.

 

Please help if i am missing anything.

Thanks

Sai

Here is my VF Page and below is my code.

When i try to run this only alert1 & 2 & 3 r getting called but the method in the controller is not getting invoked.

Please help what i m missing.

 

<apex:page controller="RemoteController" id="thePage">
<apex:form id="theForm" >
<apex:pageBlock id="theBlock" >
<apex:pageblockSection columns="1" id="searchSection">
<apex:pageBlockSectionItem id="item" >
<apex:inputText id="searchBox" />
<input type="button" value="Search" onclick="getRemoteAccount()"/>
</apex:pageBlockSectionItem>
</apex:pageblockSection>
</apex:pageBlock>

</apex:form>
<script type="text/javascript">
function getRemoteAccount() {

var accountName = document.getElementById('thePage:theForm:theBlock:searchSection:item:searchBox').value;
alert('1')
Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.RemoteController.getAccount}', accountName,
function(result, event){

var account = result[0];
alert('2')
if(account==null)
alert('3')
alert(account.Name);
if (event.status) {
// document.getElementById('acctId').innerHTML = result.Id
// document.getElementById('acctName').innerHTML = result.Name;
}
else if (event.type === 'exception') {
//document.getElementById(“responseErrors").innerHTML = event.message;
alert(event.message);
}
else {
// document.getElementById(“responseErrors").innerHTML = event.message;
alert(event.message);
}
},
{escape: true}
);
}
</script>

</apex:page>

 

****

 

public class RemoteController {
public RemoteController(){
}

@RemoteAction
public static List<Account> getAccount(String accName) {
System.Debug('Hello');
List<Account> lstAcc = [select id,name from Account where name =:accName];
if(!lstAcc.isEmpty()){
return lstAcc;
}
return new List<Account>();
}
}

 

Thanks

Sai

 

 

Hi

Is it possible to debug a VF Page & Controller in Dev Console.

 

Also is it possible to debug a JScript in VF page.

Any suggestions or help is appreciated.

Plesae help.

Thanks

Sai


I have created 2 data objects for Master & Detail (named Person & Car) with ID & Name fields/columns in each of them. Then i have created a MasterDetail Relation for in Car for Person so a Person can have multiple cars.

 

Here is the error i get in Visual Force Page and i have been stuck on this for a while if anyone can help it will be appreciated:

 

Invalid parameter for function URLFOR
Error is in expression '{!URLFOR($Action.Car__c.View,PC.Name)}' in component <apex:outputLink> in page personcarmasterdetail

 

 

And here is my VF Page:

 

<apex:page standardController="Person__c" id="thePage">

<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Person__c.ID__c}">
</apex:inputField>
<apex:inputField value="{!Person__c.Name__c}">
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockTable value="{!Person__c.Cars__r}" var="PC" title="Cars" >
<apex:column headerValue="Car ID">
{!PC.ID}
</apex:column>
<apex:column headerValue="Car Name">
<apex:outputLink >
{!URLFOR($Action.Car__c.View,PC.Name)}"
</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<!-- <apex:relatedList list="Cars__r"/> -->
</apex:page>

 

Please help.
Thanks
Sai

Is it right to assume that every record that is created for any object (standard/custom) there will be a recordid that will be created and it is a Guid. This is the one which gets displayed in the url when we look at that object.

Please help.

Thanks

Sai

Hello

I have created a DemoObject1 with a couple of fields.

 

Then i am trying to create a VF Page with this content:

 

<apex:page >
<apex:enhancedList type="DemoObject1" height="350"/>
</apex:page>

 

It displays an error that DemoObject1 does not exist.

I have also added a couple of records for DemoObject1 successfully.

Just wondering why we r getting this error.

Please help.

Thanks

Sai

When i am trying to access a test page i have created using this url

c.na9.visual.force.pages.com/apex/test

I am getting an error.

So i go to Develop --> Pages --> Test

 

But here after making the changes to this page how to test/execute this to see if the changes r good or not as we r not able to access it using the above mentioned url is there any way we can access this page.

Please help.

Thanks

Sai

I have created a bunch of objects in a training session using my training account and now i would like to import all of them including reports into my personal user account for further practising. Is it possible.

Any help is appreciated.

Thanks

Sai

Is it possible to create a youtube like app on SF.

Are there any articles which can help.

Please help.

Thanks

Sai

One more newbie question what is Allow Reports do when adding an object declaratively.

Please help.

Thanks

Sai

1. Is it possible to customize a data object page, in other words if we create a dataobject1 with field1 and add a layout to it.

And then if i would like to add a new button to this layout in this page using page layout is it possible.

 

2. Also why would we need multiple page layouts for a page.

 

Please help.

Thanks

Sai

How to create a simple VF Page with only one link in it which will upon clicking on it will take me to another VF Page2.

Please help.

Thanks

Sai

Hi

Just started learning SF so please help in ansering the new bie questions:

 

1. When creating a new visual force page from Setup --> Develop --> Pages --> New

There is a button called "Where is this used"

What is this used for as it does not show anything when i click on it.

 

A couple of more related to this:

2. What is Version Settings used for?

 

3. What is show dependencies used for?

 

Any help is really appreciated.

Thanks

Sai

Here is my method in customController:

 


public PageReference AddRecord()
{
donation.Donation_Date__c=System.today();
donation.Payment_Method__c='Credit';
donation.Payment_Source__c='In_person';
donation.Candidate__c=candidate.Id;
donation.Donation_State__c=ApexPages.currentPage().getParameters().get('state');

}

 

Here is my pageblocksection in my page:

 

<apex:pageblockSection columns="2" Title="Donation Details" >
<apex:inputField value="{!Donation.Contact__c}"/>
Candidate:{!Candidate.Name}
<apex:inputField value="{!Donation.Donation_Amount__c}"/>
<apex:inputField value="{!Donation.Donation_Date__c}"/>
<apex:inputField id="state" value="{!Donation.Donation_State__c}"/>

</apex:pageBlockSection>

 

I would like to access the inputField with id=state in my customcontroller , how to do this?

 

Please help.

 

Thanks

Sai

  • April 27, 2013
  • Like
  • 0

Is it right to assume that the DataObjects and classes and rest of the development related assets which r created by one developer r immediately available to all the developers in the entire enterprse.

 

What if we have a need to develop an application for senior management only and would not like the  related assets of this app to be available throughout the app what we do.

 

Any input is appreciated.

Please help.

Thanks

Sai

  • April 26, 2013
  • Like
  • 0

Just wondering if someone can pour some light on these questions:

 

1. Is org like a process on force.com server or is it like a deployement dir or is it like a codebase of our apps we created on the server where the code operates from could u explain from a .net or java developer perspective.

 

2. When we open an account and start developing the data objects r we working on dev org or is it sandbox org.

 

3. How to migrate this to production.

 

4. When we create and account in devforce and do some development and later if we would like another user to test using his email how to access our objects or should we share our username & pwd with them. In other words if we have a dev user and test user and we need to be able to test in parallel how to achieve this.

 

Any input it highly appreciated.

Please help.

Thanks

Sai

  • April 26, 2013
  • Like
  • 0

Just wondering if it is possible to debug using Dev Console.

 

Here is my class i have created and i have put a breakpoint at the last line of the method getList();

Then i have executed and it appears like it does not stop at the last line.

The heap dump just shows up with the objects initialized in it.

Is this the only way to debug?

 

public class Pair {
public Integer First {get; set;}
public String Second {get; set;}
public Pair(Integer first, String second)
{
this.First = first;
this.Second = second;
}
public List<Pair> getList()
{
List<Pair> pairs = new List<Pair>();
System.Debug('Debug1');
Pair p1 = new Pair(1,'One');
Pair p2 = new Pair(2,'Two');
pairs.add(p1);
pairs.add(p2);
return pairs;
}
}

I  have successfully created  a bugCase junc object by creating 2 relationships in the custom object and successfully see the related list called Bugs in Case and related list called Cases in Bug object.

Then i have successfully created a new case record from Cases tab.

Now when trying to create a new bug object by clicking on Bugs | New --> there r 2 lookups in this screen for Bug and have successfully selected from the Case lookup but when i click the lookup for Bug there r no records and only Go button is present but not the New button.

Then i have tried looking for Bug object in Customize but noticed it does not exist here also.

How to add a new Bug object.

Please help.

Thanks

Sai

I have created a new page and then i m try to override my account tab by navigating to:

Customize | Accounts | Buttons & Links | Standard Buttons & Links | Edit Accounts Tab | Override With | Visual Force Page

 

I cannot see my newly created page here.

However i see it in :

Setup | Develop | Pages.

 

Please help if i am missing anything.

Thanks

Sai

Hi

Is it possible to debug a VF Page & Controller in Dev Console.

 

Also is it possible to debug a JScript in VF page.

Any suggestions or help is appreciated.

Plesae help.

Thanks

Sai

I have created a bunch of objects in a training session using my training account and now i would like to import all of them including reports into my personal user account for further practising. Is it possible.

Any help is appreciated.

Thanks

Sai

Just wondering if we create 2 new apps called App1 & App2 will SF in the back end maintain 2 new dbs or just 1 db.

 

2nd Question: When we create a new app we r able to add tabs of existing SF app to this new app from manage new tabs

So if we add a Contact Tab to App1 and App2 will any records entered in Contacts of App1 be visible in Contacts of App2. 

 

Any input is appreciated.

Please help.

Thanks

Sai

  • April 25, 2013
  • Like
  • 0

Hi 

Just wondering if anyone has converted an n-tier .net application to SF app.

Wondering if there r any best practices for the migration.

We have a UI layer, Bus layer, data layer and sql server db.

Wondering if we should first create DataObjects for each business layer object or for data layer object.

The sObjects only appear to have attributes but not the behavior which is the methods in OO.

If we want to create the methods for sObjects can we create them.

Any references or articles will be really appreciated.

Please help.

Thanks

Sai

  • April 25, 2013
  • Like
  • 0