• Steve Ross
  • NEWBIE
  • 20 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

Hello,

I have a requirement where a case needcs to be created in a page controller, and then redirected to the case edit page where the user can make futher edits before saving. What I found however is that two recrods are created in this way, one when I insert it in my controller and another when the use clicks save on the case edit page. It was my hope that clicking save would update the existing record, not create a new one. Here is what I'm doing in my controller:     

                Case myCase = new Case();
                .... update myCase fields....
                insert myCase; // insert the case record after various fields have been updated
                casePage = new ApexPages.StandardController(myCase).edit();
                casePage.setRedirect(true);
                return casePage;

My workaround is to redirect to the detail view of the case record and have the user edit and then save.
Any ideas of how to meet my requirement?

Thanks in advance!

Seems to me that the following achomplish the same thing:

List<Account> aa = [SELECT Id, Name FROM Account WHERE Name = 'Acme'];

List<Account> aa = databse.query('SELECT Id, Name FROM Account WHERE Name = 'Acme'');

What are the advantages of using one over the other?

I'm new to writing visualforce pages and I'm wondering what the advantages/disadvantages are of using apex tags vs doing the same thing in straight html. I am creating a custom quote page and rendering it as a PDF. I will need to use the apex repeat tag and I will need to paginate as well.

 

I'f seen examples that are nearly pure HTMl and others that are all apex tags and yet others that are a mix.

 

Any advice would be appreciated.

 

Thanks, Steve

I have some code that I would love to use but it uses the SFDC_520_QuoteLine__c object. Spring 13 doesn't seem to support this object. Any ideas? What was it replaced by?

 

Thanks, Steve

Seems to me that the following achomplish the same thing:

List<Account> aa = [SELECT Id, Name FROM Account WHERE Name = 'Acme'];

List<Account> aa = databse.query('SELECT Id, Name FROM Account WHERE Name = 'Acme'');

What are the advantages of using one over the other?

Hello,

I have a requirement where a case needcs to be created in a page controller, and then redirected to the case edit page where the user can make futher edits before saving. What I found however is that two recrods are created in this way, one when I insert it in my controller and another when the use clicks save on the case edit page. It was my hope that clicking save would update the existing record, not create a new one. Here is what I'm doing in my controller:     

                Case myCase = new Case();
                .... update myCase fields....
                insert myCase; // insert the case record after various fields have been updated
                casePage = new ApexPages.StandardController(myCase).edit();
                casePage.setRedirect(true);
                return casePage;

My workaround is to redirect to the detail view of the case record and have the user edit and then save.
Any ideas of how to meet my requirement?

Thanks in advance!

We have included the articles side bar component in our case feed layout page in our trial org and later created 2 sandboxes from it. I'm getting the following error for articles sidebar component in one of the sandbox while in the other the same configuration ins working fine. There is no change in the configuration and the layout is a case feed layout. Any ideas why this behaviour?

Recently our sandboxes got upgraded to Winter 15.

Error on Articles Component
Seems to me that the following achomplish the same thing:

List<Account> aa = [SELECT Id, Name FROM Account WHERE Name = 'Acme'];

List<Account> aa = databse.query('SELECT Id, Name FROM Account WHERE Name = 'Acme'');

What are the advantages of using one over the other?

I'm new to writing visualforce pages and I'm wondering what the advantages/disadvantages are of using apex tags vs doing the same thing in straight html. I am creating a custom quote page and rendering it as a PDF. I will need to use the apex repeat tag and I will need to paginate as well.

 

I'f seen examples that are nearly pure HTMl and others that are all apex tags and yet others that are a mix.

 

Any advice would be appreciated.

 

Thanks, Steve