• Ibigfoot
  • NEWBIE
  • 30 Points
  • Member since 2011

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

I create a Visual force page to call an apex controller to create a new object.  Basically creating a Contract from the Account via a button so I can control some of the default values in the Contract, based on the Account.

 

However, there is one piece, the Contact, that I cannot predetermine as there are many contacts on an account typically.  So, what I wanted to do was have the PageReference open in Edit mode.  I was able to do that easily.  So here are the page references and results

 

        return new PageReference('/'+c.Id);

This lands on the new Contract, but is not open for editing.

 

        return new PageReference('/'+c.Id+'/e');
This lands on the new Contract in Edit Mode.  Which is correct, because I then made the Contact Signed By field required and the only editable field on the page - so the requestor can complete it.

 

However, after entering the Contact and saving the record again, the user is brought to the Home Page, not the Contract record.  Is there anyway I can control where the save takes them?  A second PageReference maybe?

Hi All,

 

Just wondering if anyone has a POM.xml file that is configured to generate java stubs using the WSC jar during a build phase? 

If so, do you mind sharing? 

 

Cheers,

Troy

I am reasonably certain I am doing everything exactly as instructed.

 

Following the workbook line by line, by the time I reach page 5 and run the app:

 

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet spring threw exception
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	java.lang.Thread.run(Thread.java:636)

 

This is surprising, typically the Force.com workbooks are flawless and following the examples works as expected.

 

Anyone else notice this, or is this user error?

 

 

  • August 05, 2012
  • Like
  • 0

I create a Visual force page to call an apex controller to create a new object.  Basically creating a Contract from the Account via a button so I can control some of the default values in the Contract, based on the Account.

 

However, there is one piece, the Contact, that I cannot predetermine as there are many contacts on an account typically.  So, what I wanted to do was have the PageReference open in Edit mode.  I was able to do that easily.  So here are the page references and results

 

        return new PageReference('/'+c.Id);

This lands on the new Contract, but is not open for editing.

 

        return new PageReference('/'+c.Id+'/e');
This lands on the new Contract in Edit Mode.  Which is correct, because I then made the Contact Signed By field required and the only editable field on the page - so the requestor can complete it.

 

However, after entering the Contact and saving the record again, the user is brought to the Home Page, not the Contract record.  Is there anyway I can control where the save takes them?  A second PageReference maybe?

So I have a VF page which renders as JSON, but I can't do any AJAX requests to it, because everytime I fetch the address:

https://c.na1.visual.force.com/apex/pageName

it gets rewritten as:

https://na1.salesforce.com/visualforce/session?url=https://c.na1.visual.force.com/apex/pageName

 

The redirect kills any AJAX methods I try.

 

Any suggestions? I'm curious if there is another way I can reach the VF page.. a static link or something.

There are 3 objects Accounts --MD--Procss unit--MD--Royalty contact;(Master Detail) I want to pull the account name into royalty contact object in a field so that i can apply lookup filter to another field name contact(Lookup to contact object) so that only account related contacts show up:

I have copied few written triggers and tried to modify this but not able to get through in the last section:Please can anyone check the trigger and let me know the syntax and correct this.. Many Thanks for all of you.. 

 

trigger acname on Royalty_Contacts__c (before insert, before update) { 

Id[] accIds = new Id[]{}; 

for (Royalty_Contacts__c c : trigger.new)accIds.add(c.Process_Unit__r.Id); 

for(Process_Unit__c acc : [Select Id, Account__c from Process_Unit__c where Id in :accIds]){

c.Account_Name__c=acc.Account__c;

}

 

Error:variable does not exist:c.Account_Name__c

I am not a developer so i have a feeble idea of what i am doing. I do not know if this trigger will work even after its corrected, so if anyone can explain the syntax of what is written it will bw hepfull:

I know line1 of trigger.

Hi,

 

If the case is not picked up by anyone in more than   30 min ,i need to send email alert

 

How this can be achieved.

 

Please Help me

Hi everyone.

 

Has anyone attempted to display a dashboard as part of a visualforce page? I have been browsing around and haven't found anything. The reason I ask is that I want to show one of our dashboards on our company's intranet websites, and figured the easiest way to do it would be to display it in visualforce and publish it as a Site that the intranet web could then incorporate into it's layout.

 

If anyone has any hints or tips I'm all ears :)

 

Regards,

Ivar

hi i am working on customer portal and i have written this code for login and password details actually i am new to this plz check my code and some plz help me with some code how to make this work

/**
 * An apex page controller that exposes the site login functionality
 */
global class SiteLoginController {
    global String username {get; set;}
    global String password {get; set;}

    global PageReference login() {
        String startUrl ;//= System.currentPageReference().getParameters().get('startURL');
if (startUrl == null)
   startURL = (Site.getPrefix() != null ? '' : Site.getPrefix()) + '</home/home.jsp>'; 
   
        return Site.login(username, password, startUrl);
        //return page.page;
    }
    /*global SiteLoginController () {}
    
    global static testMethod void testSiteLoginController () {
        // Instantiate a new controller with all parameters in the page
        SiteLoginController controller = new SiteLoginController ();
        controller.username = 'test@salesforce.com';
        controller.password = '123456'; 
                
        System.assertEquals(controller.login(),null);                           
    }  */
      
}

 

 

I have two <apex:inputText> tags on VF pages  which receives Birthdate and have Jquery Datepicker.

<apex:inputText value="{!BirthDate}"/>

and 

<apex:inputText value="{!BirthDateTo}"/>

When user select date in both fields.

 

I want to pick results through SOQL in from range.

like.

select id from object__c where dob>= birthdate and dob<=birthdateto

 

But the date type of dob in object is of type Text instead of Date.

 

Is anyone help me to how to query the data in range if i have the datatype of dob in text.

Please help me.

 

  • October 24, 2011
  • Like
  • 0

Hi


In Email Template, I want to display the details of child object field, when i tried it is not working for me can any please help me in this

Thanks in Advance!

  • October 23, 2011
  • Like
  • 0

I am evaluating the possibilities of contact management integration between Force.com organizations and third-party CMS and I would like to clarify a few points. If you could at least point me in the right direction, please let me know.

 

According to the documentation contact management (accounts and contacts) is available in all editions except Database.com. Is this information correct? The Service cloud edition comparison available at http://www.sfdcstatic.com/assets/pdf/datasheets/DS_ServiceCloud_EdCompare.pdf does not mention contact management and the Force.com edition comparison available at http://www.sfdcstatic.com/assets/pdf/datasheets/DS_Forcedotcom_EdCompare.pdf states that in One App edition accounts and contact are read-only.

 

Contact management objects in SalesForce and third-party CMS are very similar so I’m currently considering a composite application implementation where third-party CMS replicates accounts and contacts into Force.com organization via the integration API and the application provides a view of contact related data such as contact activities available via third-party CMS REST services.

 

After browsing through the ISV guide and Wiki articles, I came to the conclusion that this free composite managed application could be classified as a native managed application and consequently turned into an Aloha application with special permissions allowing it to run APEX code and access the integration API in Group and Professional editions. I’m also aware that Aloha applications require security review at regular intervals and that the process of granting special permissions is not automatic. However, as the application is freely available, the security review should be free of charge and it seems that request for special permissions could be rejected only in case the application does not meet the requirements in areas such as code coverage or security. Are these conclusions correct?

  • October 21, 2011
  • Like
  • 0

Does anyone know how I can check in APEX IF Chatter is enabled for the current Org?

 

I need to check either in a Visualforce page or in an Apex Class and display chatter if it is, and not display it if it is not enabled.

 

thanks

  • March 10, 2011
  • Like
  • 0