• Vandana Rattan 4
  • NEWBIE
  • 85 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 63
    Questions
  • 39
    Replies
I have to send emails to campaign members when campaign status changes. I have created automations through process builder to update campaign member when campaign status changes and send an email to campaign member. How can I store the email on related Contact record?
Hi,

I need to lookup account names in Salesforce when data is entered into a text field in an HTML form. Is there any way this can be achieved?

Thanks,
Vandana
I am using VSCode as code editor for our org. Now I need to introduce change management. I have created a Git account and a blank repository. I have following queries:

1. Sandbox repository: How do I setup a Sandbox repository? I alredy have authorised the Sandbox org in VSCode and retreived the classes, pages, etc. Now how do I include these in Git? Or do I not need that at all? Should I just push the components being changed to Git and later merge them to the environment I want? 
2. Merge changes: If I am not copying the whole sandbox to Git how do then I merge these changes to the Sandbox? How will the compilation issues, etc be resolved?
3. Change Sets: How do I push changes from dev Sandbox to Full copy and then to Prod?

Apologies for such basic queries but I want to set the processes right at the very beginning instead of having to redo them.

Thanks,
Vandana
We are moving to multi instance org as our subsidiary is being migrated to Salesforce. One of the requirements is to create a new opportunity in the new instance when a particular opp closes in 1st instance. Has anyone implemented a similar scenario? Is it possible to trigger record creation in 2nd instance when a record is updated in 1st?

Many thanks!!
I am trying to build a Custom Adapter for showing data in Salesforce at runtime using Salesforce Connect. Target DB is Oracle. Below is the error which I get when I try  to view data for the external object via a custom tab that I have built:

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

Any suggestions on how this can be resolved?
Hi,

I am new to Salesforce Connect and need to know if following are possible using the tool:

1. Update custom fields on Accounts object using External Object field values (Flows and process builder)
2. Is it possible to show data retrived using External objects on Accounts detail page (not related lists) - eg. If an account has active Contracts show them on Account details page in a Contract Details section.

Many Thanks
How can we bring in data at real time into Salesforce from Oracle? I know Lightning Connect is one of the tools. But are there any alternatives? 
Scenarion:
Whenever an account detail page is opened pull some data from Oracle and display.

Many Thanks
We are looking to implement Live Chat functionality for our website whch is not built on Force.com platform. As we use Salesforce CRM for customer service we need the Live Chat solution to genertae cases in Salesforce for any chats that happen. Any recommendations?
Is it possible to pass WS Addressing information in a SOAP Web Service call in Salesforce?

Thanks,
Vandana
We are in process of pgrading Oracle Cloud Adapter for Salesforce.com. While doing so we are getting error below. We have tried gatting the latest Enterprise WSDL as well.

<Mar 24, 2019 6:23:23 AM AEDT> <Error> <JCA_FRAMEWORK_AND_ADAPTER> <BEA-000000> <servicebus:/WSDL/cmn.crm/bus.svc.soa/salesforce/v31/wsdl/queryCases [ queryCasesPortType::query(parameters,parameters) ] - Could not invoke operation 'query' due to: 

javax.resource.ResourceException: Unable to create Cloud Operation: 
    at oracle.tip.adapter.cloud.CloudAdapterInteraction.createCloudOperation(CloudAdapterInteraction.java:273)
    at oracle.tip.adapter.cloud.CloudAdapterInteraction.execute(CloudAdapterInteraction.java:135)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:537)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:374)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:333)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:350)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:262)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:587)
    at sun.reflect.GeneratedMethodAccessor832.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at com.sun.proxy.$Proxy136.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:510)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:445)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:582)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:449)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:692)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:595)
    at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
    at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
    at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
    at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1098)
    at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:101)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:597)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:595)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:594)
    at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:398)
    at com.bea.wli.sb.transports.CoLocatedMessageContext$1.run(CoLocatedMessageContext.java:140)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.util.security.SecurityUtils.runAs(SecurityUtils.java:58)
    at com.bea.wli.sb.transports.CoLocatedMessageContext.send(CoLocatedMessageContext.java:137)
    at com.bea.wli.sb.transports.http.wls.HttpTransportProvider.sendMessageAsync(HttpTransportProvider.java:215)
    at sun.reflect.GeneratedMethodAccessor832.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at com.sun.proxy.$Proxy121.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:510)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:445)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:582)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:449)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:692)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:595)
    at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
    at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
    at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
    at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1098)
    at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:101)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:597)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:595)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:594)
    at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:398)
    at com.bea.wli.sb.transports.local.LocalMessageContext$1.run(LocalMessageContext.java:181)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.transports.local.LocalMessageContext.send(LocalMessageContext.java:176)
    at com.bea.wli.sb.transports.local.LocalTransportProvider.sendMessageAsync(LocalTransportProvider.java:322)
    at sun.reflect.GeneratedMethodAccessor832.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at com.sun.proxy.$Proxy121.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:510)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:445)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:582)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:449)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:692)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatch(PipelineContextImpl.java:595)
    at stages.routing.runtime.RouteRuntimeStep.processMessage(RouteRuntimeStep.java:128)
    at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
    at com.bea.wli.sb.pipeline.RouteNode.doRequest(RouteNode.java:106)
    at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1098)
    at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:101)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:597)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:595)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:594)
    at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:398)
    at com.bea.wli.sb.transports.http.generic.RequestHelperBase.invokePipeline(RequestHelperBase.java:187)
    at com.bea.wli.sb.transports.http.wls.HttpTransportServlet$RequestHelperWLS.invokePipeline(HttpTransportServlet.java:228)
    at com.bea.wli.sb.transports.http.generic.RequestHelperBase$1.run(RequestHelperBase.java:162)
    at com.bea.wli.sb.transports.http.generic.RequestHelperBase$1.run(RequestHelperBase.java:160)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.transports.http.generic.RequestHelperBase.securedInvoke(RequestHelperBase.java:159)
    at com.bea.wli.sb.transports.http.generic.RequestHelperBase.service(RequestHelperBase.java:107)
    at com.bea.wli.sb.transports.http.wls.HttpTransportServlet.service(HttpTransportServlet.java:129)
    at weblogic.servlet.FutureResponseServlet.service(FutureResponseServlet.java:24)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3750)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: oracle.cloud.connector.api.CloudInvocationException: oracle.j2ee.ws.wsdl.LocalizedWSDLException: WSDLException: faultCode=INVALID_WSDL: Invalid XML in document at: sf_enterprise_v31.wsdl, line: {1}, column: {2}: org.xml.sax.SAXParseException: Premature end of file.
    at oracle.cloud.connector.impl.SOAPEndpoint.parseDefinition(SOAPEndpoint.java:234)
    at oracle.cloud.connector.impl.SOAPEndpoint.getTargetDefinition(SOAPEndpoint.java:129)
    at oracle.cloud.connector.impl.SOAPEndpoint.getEndpointURLFromWSDL(SOAPEndpoint.java:136)
    at oracle.cloud.connector.impl.SOAPEndpoint.initializeSOAPEndpoint(SOAPEndpoint.java:116)
    at oracle.cloud.connector.impl.SOAPEndpoint.initialize(SOAPEndpoint.java:99)
    at oracle.cloud.connector.impl.AbstractRemoteSessionManager.initialize(AbstractRemoteSessionManager.java:55)
    at oracle.tip.adapter.cloud.CloudAdapterInteraction.createCloudOperation(CloudAdapterInteraction.java:250)
    ... 125 more
Caused by: oracle.j2ee.ws.wsdl.LocalizedWSDLException: WSDLException: faultCode=INVALID_WSDL: Invalid XML in document at: sf_enterprise_v31.wsdl, line: {1}, column: {2}: org.xml.sax.SAXParseException: Premature end of file.
    at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:218)
    at oracle.cloud.connector.impl.SOAPEndpoint.parseDefinition(SOAPEndpoint.java:232)
    ... 131 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1437)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1019)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:503)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:338)
    at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:165)
    at oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:211)
    ... 132 more

Any pointers would be appreciated.

Thanks,
Vandana

 
Hi All,

We are looking to implement Chatbots for our website not built on Salesforce platform. Can Salesforce BOT API  or Einstein Bot be deployed on non Salesforce platform website?

Thanks
I am planning to build a Lightning Component form and expose it using force.com sites. The respondents should be able to save progress and resume later. can anybody give pointers how this can be achieved?

Thanks,
Vandana
I have generated a Web to Lead form with reCaptcha in Sandbox. It submits fine to the return URL but is not generating any leads. I tried to debug using <input type="hidden" name="debug" value=1> and I can see the g-recaptcha-response: coming with a value. Why are leads not getting generated in Sandbox though?

Thanks,
Vandana
Hi All,

I have custom objects with pickilists like status, position, etc. on them. I have a requirement to allow admin users to add new values to piclists. How can I achieve this? Is it possible through lightning or should I target Visualforce only?

Thanks,
Hi,

I have some requirements where :
1. I need an app that can be downloaded on mobile. When people install the app and submit data it should come into Salesforce. Also based on answers, we might need some more information from customers or show them some options. If these customers walkin to some of events hosted by our company they should be able to scan there mobile (or a barcode generated on mobile while they submitted info) and proceed.
2. Event Registration app is also required - so for people who register once for an event do not have to reregister when they walkin for another event (they should be given some code to scan and proceed).

Kindly suggest how should I proceed. Are there any appExchange apps available which I can customize?

Thanks,
Vandana
 
Is it possible to add Close button just like aClose button on any browser window (X on top right) in Visualforce page?

Thanks,
Vandana
Hi,

My org is currently on TLS 1.0. There are integrations with:

Marketing Cloud - Using Marketing Cloud Connector
Oracle - Using Oracle cloud Adapter for Salesforce.com

The login history report shows Client version as 1.0 for Marketing Cloud but N/A for Oracle integration. What does this mean? How can we go about setting TLS to a higher version for both of these?

Many Thanks
I am trying to query OpportunityContactRole for contacts and poulating the results in a mapwith ContactId as key and OpportunityId as value. I keep on geeting compilation error Incompatible key type Object for Map<Id,Id> in the line where I am polulating mpCtIdOppId. Kindly suggest.
 
Map<Id,Id> mpCtIdOppId = new Map<Id,Id>();
        Map<Id,List<OpportunityContactRole>> mpCtIdOppCtRl = new Map<Id,List<OpportunityContactRole>>();
        List<OpportunityContactRole> lstOppCtRole = [Select OpportunityId, ContactId from OpportunityContactRole where ContactId in: scope];
        System.debug('lstOppCtRole >>>' + lstOppCtRole);
        
        for(OpportunityContactRole oppctrl1: lstOppCtRole){
            System.debug('oppctrl1 contactid >>>' + oppctrl1.get('ContactId'));
            mpCtIdOppId.put(oppctrl1.get('ContactId'), oppctrl1.get('OpportunityId'));
        }

 
Hi SF Gurus,

I am looking to integrating Salesforce and oracle on near real time basis. Can you guys suggest which one is better in terms of ease of setup, maintenance, usability:

1. Oracle Data Integrator
2. Jitterbit
3. Mulesoft

Kindly suggest. This is urgent.

Thanks
Hi,

We have implemented Email to Case for our Services team. It works well and they are notified when they send email to customers from case and customers reply. Is it however possible that notifications be sent to people even when cases are logged by a cretain person (email id)? So service reps select which customers they want to follow/track and whenever new cases are generated from emails sent by those people, service reps are notified?

Thnanks,
Vandana
Hi All,

We are looking to implement Chatbots for our website not built on Salesforce platform. Can Salesforce BOT API  or Einstein Bot be deployed on non Salesforce platform website?

Thanks
I am trying to build a Custom Adapter for showing data in Salesforce at runtime using Salesforce Connect. Target DB is Oracle. Below is the error which I get when I try  to view data for the external object via a custom tab that I have built:

System.HttpResponse[Status=Service Unavailable, StatusCode=503]

Any suggestions on how this can be resolved?
Is it possible to pass WS Addressing information in a SOAP Web Service call in Salesforce?

Thanks,
Vandana
I have generated a Web to Lead form with reCaptcha in Sandbox. It submits fine to the return URL but is not generating any leads. I tried to debug using <input type="hidden" name="debug" value=1> and I can see the g-recaptcha-response: coming with a value. Why are leads not getting generated in Sandbox though?

Thanks,
Vandana
Hi,

I have some requirements where :
1. I need an app that can be downloaded on mobile. When people install the app and submit data it should come into Salesforce. Also based on answers, we might need some more information from customers or show them some options. If these customers walkin to some of events hosted by our company they should be able to scan there mobile (or a barcode generated on mobile while they submitted info) and proceed.
2. Event Registration app is also required - so for people who register once for an event do not have to reregister when they walkin for another event (they should be given some code to scan and proceed).

Kindly suggest how should I proceed. Are there any appExchange apps available which I can customize?

Thanks,
Vandana
 
I am trying to query OpportunityContactRole for contacts and poulating the results in a mapwith ContactId as key and OpportunityId as value. I keep on geeting compilation error Incompatible key type Object for Map<Id,Id> in the line where I am polulating mpCtIdOppId. Kindly suggest.
 
Map<Id,Id> mpCtIdOppId = new Map<Id,Id>();
        Map<Id,List<OpportunityContactRole>> mpCtIdOppCtRl = new Map<Id,List<OpportunityContactRole>>();
        List<OpportunityContactRole> lstOppCtRole = [Select OpportunityId, ContactId from OpportunityContactRole where ContactId in: scope];
        System.debug('lstOppCtRole >>>' + lstOppCtRole);
        
        for(OpportunityContactRole oppctrl1: lstOppCtRole){
            System.debug('oppctrl1 contactid >>>' + oppctrl1.get('ContactId'));
            mpCtIdOppId.put(oppctrl1.get('ContactId'), oppctrl1.get('OpportunityId'));
        }

 
Hi All,

I have created a SOA DB Adapter webservice to update database. I am able to successfully test the service from Em console and using SOAPUI. I now want to call this service from Salesforce. I have:

1. Generated Stub classes using the WSDL 
2. Write a class to call web service
3. Invoke the class from trigger

I am getting following error:

16:07:42:030 EXCEPTION_THROWN [37]|System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'

I cannot see any instances getting generated on EM console so perhaps it isn't hitting the service at all. 

Also my webservice end point looks like:

http://192.168.24.7:8001/soa-infra/services/default/TestDBAdapter/bpelprocess1_client_ep

So what should I put in Remote Sites Settings? Currently I have following http://192.168.24.7:8001

TIA



 
I am trying to create a workflow triggered outbound message that would invoke a soa web service. However I keep on getting 403 Forbidden when I try to execute the outbound message. Kindly suggest.
Hi All,

I am using RichFaces.switchTab('j_id0:frm:tabPanel','j_id0:frm:tabId','tabname'); to navigate between tabs. I want to disbale all tabs and enable them only when Continue or previous button is clicked. However if I set the property disabled="true" for a tab and navigate to it using  RichFaces.switchTab('j_id0:frm:tabPanel','j_id0:frm:tabId','tabname'); navigation does happen but the tab is blank and still disabled. I tried setting the classes using:

document.getElementById("j_id0:frm:tab_cell").className = "rich-tabhdr-cell-active";
 document.getElementById('j_id0:frm:tab_lbl').className ="rich-tab-header rich-tab-active activeTab   ";

this does take effect but still the tab is disabled and blank.

Kindly suggest.

Regards,
Vandana
I am creating VF page to upload and save attachments. Issue I am facing is that when I include jquery-1.9.1.min.js the filename and body are not getting set in controller. When I remove this the attachments are uploaded fine. Has anyone faced such issue? Kindly suggest.

VF Code:
 
<apex:page standardController="Case" extensions="NERController" showHeader="false" standardStylesheets="false" docType="html-5.0" applyBodyTag="false" applyHtmlTag="true">
    <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'/> 
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <apex:includeScript id="script2" value="{!URLFOR($Resource.ChargentCases__CreditCardJS, 'bililiteRange.js')}" loadOnReady="false"/>
    <apex:stylesheet value="https://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
    <!--<apex:includeScript value="https://code.jquery.com/jquery-1.9.1.min.js"/>-->
    
    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
    <apex:includeScript value="https://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"/>
    <meta http-equiv="X-Frame-Options" content="deny" />
    
    <style>

    .inactiveTab { background-color: white; color:black; background-image:none}
        
    .header {
    	background-color: lightgray;
        text-align: left;
        color: black;
        font-size: 20px;
        height: 100px;
                /*margin-bottom: 20px;*/
    }
    .activeTab {
    	background-color: #e6dead;
        text-align: left;
        color: black;
        font-size: 15px;
        height: 20px;
        font-family: Open Sans;
        font-weight: bold
        
    }
    .ui-btn-text{
    	text-align: left;
    }
    
        
	.requiredBlock {background-color: transparent; }

	.requiredBlock::before { content: "*"; font-size: 1.5em; font-weight: bold;  color: #c00; }
        
    .inner{
    	display: block;
        position: relative;
       	margin: .5em 0;
        padding: 0;
        background-clip: padding-box;
        border-radius: 1em;
        border: 1px solid #ccc;
        background: #eee;
        font-weight: bold;
        color: #222;
    	text-shadow: 0 1px 0 #fff;
        background-image: linear-gradient( #fff,#f1f1f1 );
        z-index: 1;
    	width: 100%;
        -webkit-user-select: none;
     }
        
    
        .ChooseFileContainer {
        position:relative;
        display:inline;
        }
        
        .OverlayButton {
        position:absolute;
        left:5px;
        right:0;
        } 
    </style>

    
    
    <apex:form id="frm" style="width: 100%; height:100%; background-color: white; display: inline-block; text-align: center;">  
        <apex:outputPanel id="all" layout="block" style="display: inline-block; text-align: left; width:80%;">
            <apex:outputPanel id="header" layout="block" style="background-color: white;">
        
                <!-- This is a Header block. Paste your APEX or HTML code here. -->
        
                <!-- APEX image example: -->
                <!--<apex:image value="{!URLFOR($Resource.ChargentBase__ChargentStyling, 'img/Chargent.png')}" style="display: block; margin: 0 auto; margin-bottom: 20px;"/> <!-- height="100px" width="410px"  -->
                <apex:image url="{!$Resource.NERBanner}" style="display: block; "/>
                </apex:outputPanel>
            <br></br>
 <apex:tabPanel switchType="client" selectedTab="regEligibility" id="tabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">

<apex:tab label="About You" name="abtYou1" id="abtYou" style="background-color: white;" >
                    
							
                            <apex:outputPanel layout="block" styleClass="headersmall">
                            <h1><apex:outputText value="About You" style="font-family:Open Sans; font-weight:bold;"/></h1>
                             <apex:outputLabel value="Photo Identification" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;"/>
                                
                              </apex:outputPanel>
                    			<br></br>
                             <!--<apex:outputPanel layout="block" styleClass="requiredBlock">-->
                             <div class = "ChooseFileContainer">
                                 <apex:outputLabel value="Please upload a copy of a Primary identification document:" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck8"/>
                                <apex:inputFile value="{!fileBody}" filename="{!fileName}" />
                                     
                                 <!--<input id="CustomChooseFileButton" type="text" size="23" name="CustomChooseFileButton" value="Choose File" class="OverlayButton btn" />-->
                                 
                                </div>
                                <!--<apex:outputLabel value="Photo Identification" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;"/>-->
                    			<!--</apex:outputPanel>-->
							<br></br>
                             <apex:outputPanel layout="block" styleClass="requiredBlock">
                             	<div class = "ChooseFileContainer">
                                 <apex:outputLabel value="Please upload a Passport-style photo:" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck8"/>
                                <apex:inputFile value="{!fileBody}" filename="{!fileName}" style="padding-left:65px" />
                                     
                                 <!--<input id="CustomChooseFileButton" type="text" size="23" name="CustomChooseFileButton" value="Choose File" class="OverlayButton btn" />-->
                                 
                                </div>
                    			</apex:outputPanel>
                                <!--<input id="CustomChooseFileButton" type="text" size="23" name="CustomChooseFileButton" value="Upload Object Names File" class="OverlayButton btn" />-->
                                <!--<br></br>
                             	<apex:outputPanel layout="block" styleClass="requiredBlock" id="primID">
                                <apex:outputText value="Please upload a copy of Primary identification document:" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                                <apex:actionRegion >
                             	<apex:inputFile value="{!myfile.body}" filename="{!myfile.Name}" style="padding-left:65px" />
                                    
                             	<apex:commandButton value="Upload" action="{!upload}"/>
                                    </apex:actionRegion>
                                    </apex:outputPanel>
                             
                             	<apex:outputPanel layout="block" styleClass="requiredBlock" id="pptPhoto">
                                <apex:outputText value="Please upload a Passport-style photo:" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                                <apex:actionRegion >
                             	<apex:inputFile value="{!myfile.body}" filename="{!myfile.Name}" style="padding-left:65px" />
                                
                             	<apex:commandButton value="Upload" action="{!upload}"/>
                                    </apex:actionRegion>
                                    </apex:outputPanel>
                             </div>
                        <!--<apex:selectList id="stateWorkingIn" value="{!case.Australian_state_primarily_working_in__c}" title="Are you a Member of Engineers Australia" size="1" />-->
                        <!--</apex:outputPanel>
						<apex:actionRegion >-->
						<br></br>
						<html>
                        <table style="width:100%">
                            
                       <tr style="width=100%;">
                           <td style="align:left;width:20%;"><apex:commandButton id="contAbtYouBtn" value="Continue" action="{!upload}"/></td>
                           <td><apex:commandLink value="Previous" style="font-family:Open Sans; font-weight:bold;"/></td>
                           
                           <!--<td style="align:right;width:20%;"><apex:commandButton id="subBtn" value="Submit" action="{!upload}"/></td>-->
                            </tr>
                       </table>
				</html>
                   
<!--</apex:actionRegion>-->
                      
				</apex:tab>

        <script type="text/javascript">
	$j = jQuery.noConflict();

	

	$j = (function(){
              // script that triggers the click of the standard
              // choose file button 
              $('#CustomChooseFileButton').click( function(e) {
                                       $('input[type="file"]').click();});
                                       // script to hide the blinking cursor
                                      $('input[type="text"]').mousedown(function(e) { 
                                        e.preventDefault();
                                       $(this).blur();
                                       return false;
                                 });
         });
	</script>
</apex:page>

Controller:
 
public class NERController {
    
    public ApexPages.StandardController standardContactController;
    public String selectedTab;
    public Case objCase;
    public boolean val1 {get;set;}    
    public boolean val2 {get;set;} 
    public boolean val3 {get;set;} 
    public boolean val4 {get;set;} 
    public blob fileBody {get;set;}
        public String fileName {get;set;}
   // Public Attachment myfile{get;set;}
    public List<SelectOption> types{
        get{
             System.debug('In getTypes>>>>>');
            types = new List<SelectOption>();
             Schema.sObjectType sobject_type = objCase.getSObjectType();
            Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();
             Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
            List<Schema.PicklistEntry> pick_list_values = field_map.get('Evidence_of_Engineering_qualification__c').getDescribe().getPickListValues();
            
            //List<selectOption> options = new List<selectOption>();
    
               for (Schema.PicklistEntry a : pick_list_values) {
                          types.add(new selectOption(a.getLabel(), a.getValue()));
              }
            System.debug('types>>>>>' + types);
          return types;
        }
        set;}
    
    /*public String getFileName()
    {
    	return this.fileName;
    }
    
    public void setFileName(String fileName)
    {
    this.fileName = fileName;
    }
    
    public Blob getFileBody()
    {
    return this.fileBody;
    }
    
    public void setFileBody(Blob fileBdy)
    {
    this.fileBody = fileBdy;
    //setFileSize(this.attach.size());
    }
    
    /*Public Attachment myfile{
        get {
          if (myfile == null)
            myfile = new Attachment();
          return myfile;
        }
        set{
            System.debug('in set fillllllllllleeeeee'+ myfile);
        }
  }*/
    /*Public Attachment getmyfile()
    {
        myfile = new Attachment();
        return myfile;
    }*/
    
    public NERController.NERController(ApexPages.StandardController controller){
        standardContactController = controller;
        this.objCase =(Case) controller.getRecord();
        //myfile = new Attachment();
        selectedTab = 'regEligibility';
        //System.debug('myfile >>>>' + myfile);
    }
    
    public string getselectedtab() {
     return selectedtab;
  	}
    
    public boolean getistab1disabled() {
    	return selectedTab <> 'regEligibility';
  	}

  	public boolean getistab2disabled() {
    	return selectedTab <> 'nerAreas';
  	}
    
    public boolean getistab3disabled() {
    	return selectedTab <> 'abtYou';
  	}
    
     public boolean getistab4disabled() {
    	return selectedTab <> 'qual';
  	}

  	public void enabletab1() {
    	selectedtab = 'regEligibility';
  	}

  	public void enabletab2() {
    	selectedtab = 'nerAreas';
  	}
    
    public void enabletab3() {
    	selectedtab = 'abtYou';
  	}
    
    public void enabletab4() {
    	selectedtab = 'qual';
  	}
    
    public void find(){
       System.debug('in find>>>>'); 
        System.debug('in find>>>> val1' + val1); 
    }
    
    public ApexPages.Pagereference upload()
    {
        
         Id caseId = createCase();
        System.debug('caseId>>' + caseId);
        System.debug('fileBody>>' + this.fileBody);
        System.debug('fileName>>' + this.fileName);
		//myfile.parentId = caseId;
        Attachment a = new Attachment();
        a.body = this.fileBody;
        a.name = this.fileName;
        a.parentId = caseId;
         //myfile.ParentId = caseId;
        //myfile.Body = attach;
        //myfile.Name = fileName;
         /* insert the attachment */
        Database.SaveResult result = Database.insert (a);
        return null;
    }   
    
    public Id createCase(){
        System.debug('In craete Case' );
        
        Id ftRecTypeId = [SELECT Id from recordType where name='National Engineering Register' and sObjectType='Case' LIMIT 1].id;
        //List<Contact> lstct = [Select Id from Contact where EA_Member_No__c=: msaCase.Applicatnt_s_EA_ID__c LIMIT 1];
        //System.debug('lstct>>' + lstct[0].Id);
        //Id ctId = [Select Id from Contact where EA_Member_No__c=: msaCase.Applicatnt_s_EA_ID__c LIMIT 1].Id;
        //Id gatewayId = [Select Id frokm ChargentBase__Gateway__c where Name='eWay Gateway' LIMIT 1].Id;
         Case insCase = new Case();
       
             insCase.RecordTypeId = ftRecTypeId;
            insCase.Status = 'New';
            insCase.Origin = 'Web';
            
           
            insert insCase;
       
        return insCase.Id;
    }
    
   /* public List<SelectOption> getTypes(){
        System.debug('In getTypes>>>>>');
    	 Schema.sObjectType sobject_type = case.getSObjectType();
        Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();
         Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
        List<Schema.PicklistEntry> pick_list_values = field_map.get('Evidence_of_Engineering_qualification__c').getDescribe().getPickListValues();
        
        //List<selectOption> options = new List<selectOption>();

           for (Schema.PicklistEntry a : pick_list_values) {
                      types.add(new selectOption(a.getLabel(), a.getValue()));
          }
        System.debug('types>>>>>' + types);
      return types;
        
    }*/
    
    

}


Thanks,
Vandana
 
Hi VF Gurus!!
I am developing a Visualforce page with multiple tabs to be used in our force.com site. On the tabs I validate all data and click Continue or Previous buttons to navigate to next or previous tab. I set selectedTab for seting which tab to enable or disbale and then reRender the tabpanel. However, when I do this all page formatting is lost. On inspecting one of the dropdown lists on first page I found that after rerender some <div> and <span> tags are not being applied on re render. Has anyone observed same behaviour? How can I work around this?

VF:
<apex:page standardController="Case" extensions="NERController" showHeader="false" standardStylesheets="false" docType="html-5.0" applyBodyTag="false" applyHtmlTag="true">
    <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'/> 
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <apex:includeScript id="script2" value="{!URLFOR($Resource.ChargentCases__CreditCardJS, 'bililiteRange.js')}" loadOnReady="false"/>
    <apex:stylesheet value="https://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
    <apex:includeScript value="https://code.jquery.com/jquery-1.9.1.min.js"/>
    <apex:includeScript value="https://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"/>
    <style>

    .inactiveTab { background-color: white; color:black; background-image:none}
        
    .header {
        background-color: lightgray;
        text-align: left;
        color: black;
        font-size: 20px;
        height: 100px;
 
    }
    .activeTab {
        background-color: #e6dead;
        text-align: left;
        color: black;
        font-size: 15px;
        height: 20px;
        font-family: Open Sans;
        font-weight: bold
        
    }
    .ui-btn-text{
        text-align: left;
    }
   
    .requiredBlock {background-color: transparent; }

    .requiredBlock::before { content: "*"; font-size: 1.5em; font-weight: bold;  color: #c00; }
        
   
    </style>

    <apex:form id="frm" style="width: 100%; height:100%; background-color: white; display: inline-block; text-align: center;">  
        <apex:outputPanel id="all" layout="block" style="display: inline-block; text-align: left; width:80%;">
            <apex:outputPanel id="header" layout="block" style="background-color: white;">
       
                <apex:image url="{!$Resource.NERBanner}" style="display: block; "/>
                </apex:outputPanel>
            <br></br>
        
            <apex:tabPanel switchType="client" selectedTab="{!selectedTab}" id="tabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">
        
                <apex:tab label="Registration eligibility" name="regEligibility" id="regEligibility" style="background-color: white;" disabled="{!istab1disabled}">
                    
                    <apex:outputPanel layout="block">   
                        
                        <apex:outputPanel layout="block">
                        <apex:outputText value="Are you a Member of Engineers Australia?" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                           
                        <apex:outputPanel layout="block" >
                          
                        <apex:selectList id="exstEAMem" value="{!case.Are_you_a_Member_of_Engineers_Australia__c}" title="Are you a Member of Engineers Australia" size="1" style="text-align: left;">
                            <apex:selectOption itemValue="select" itemLabel="-- Please Select --" />
                            <apex:selectOption itemValue="yes" itemLabel="Yes" />
                            <apex:selectOption itemValue="no" itemLabel="No" />
                            <apex:actionSupport event="onchange" reRender="createLink" />
                        </apex:selectList>
                              
                        <apex:outputText id="errexstEAMem" value="Error: Please select a value" style="color:red;display:none;font-family:Open Sans;"/>
                            </apex:outputPanel>
                        </apex:outputPanel>
                               
                       
                        <br></br>
                        <apex:outputPanel id="createLink">
                            
                            <apex:outputPanel layout="block"  styleClass="requiredBlock" rendered="{!IF(case.Are_you_a_Member_of_Engineers_Australia__c == 'no',TRUE,FALSE)}">
                           
                                <apex:outputText value="Have you created an EA ID? If not you will need one to progress your application." style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br> 
                                <apex:outputText value="Please create an " style="font-family:Open Sans; font-size:12px; "/><apex:outputLink value="https://www.engineersaustralia.org.au/portal/profile/create" id="theLink" target="_blank">EA ID here.</apex:outputLink>
                            </apex:outputPanel>
                    </apex:outputPanel>
                        
                        <br></br>
                        
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                                
                                    <apex:outputText value="Please provide your EA ID / Member Number" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br>   
                                                                                  
                                    <apex:inputText value="{!case.Applicatnt_s_EA_ID__c}" id="eaId" styleClass="inputText" style="font-family:Open Sans;"/>
                                      
                                    <apex:outputText id="erreaId" value="Error: This field is required. Please enter a value." style="color:red;display:none;font-family:Open Sans;"/>
                                
                            </apex:outputPanel>
                        <br></br>
                        
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                            <apex:outputText value="First Name" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br> 
                            <apex:inputText value="{!case.First_Name__c}" id="frstName" styleClass="inputText" style="font-family:Open Sans;"/>
                            <apex:outputText id="errfrstName" value="Error: This field is required. Please enter a value." style="color:red;display:none;font-family:Open Sans;"/>
                        </apex:outputPanel>
                    <br></br>
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                            <apex:outputText value="Last Name" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br> 
                            <apex:inputText value="{!case.Last_Name__c}" id="lastName" styleClass="inputText" style="font-family:Open Sans;"/>
                            <apex:outputText id="errlastName" value="Error: This field is required. Please enter a value." style="color:red;display:none;font-family:Open Sans;"/>
                        </apex:outputPanel>
                        
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                            <apex:outputText value="Email Address" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br> 
                            <apex:inputText value="{!case.Email_address__c}" id="emlAddress" styleClass="inputText" style="font-family:Open Sans;"/>
                            <apex:outputText id="erremlAddress" value="Error: This field is required. Please enter a value." style="color:red;display:none;font-family:Open Sans;"/>
                            <apex:outputText id="errInvalidEmlAddress" value="Please enter a valid email address." style="color:red;display:none;font-family:Open Sans;"/>
                        </apex:outputPanel>
                        <br></br>
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Phone Number" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/> <br></br> 
                        <apex:inputText value="{!case.Phone_Number__c}" id="phNumber" styleClass="inputText" style="font-family:Open Sans;"/>
                        <apex:outputText id="errphNumber" value="Error: This field is required. Please enter a value." style="color:red;display:none;font-family:Open Sans;"/>
                        </apex:outputPanel>
                        <br></br>
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Australian state primarily working in" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                            <apex:selectList id="state" value="{!case.Australian_state_primarily_working_in__c}" title="In which Australian state do you primarily work?" size="1" style="text-align: left;">
                                <apex:selectOption itemValue="select" itemLabel="-- Please Select --" />
                                <apex:selectOption itemValue="ACT" itemLabel="ACT" />
                                <apex:selectOption itemValue="NSW" itemLabel="NSW" />
                                <apex:selectOption itemValue="VIC" itemLabel="VIC" />
                                <apex:selectOption itemValue="OA" itemLabel="OA" />
                            </apex:selectList>
                            
                        </apex:outputPanel> 
                        <br></br>
                        <apex:outputPanel layout="block" styleClass="headersmall">
                            <h1><apex:outputText value="Professional Indemnity Insurance" style="font-family:Open Sans; font-weight:bold;"/></h1>
                       
                        </apex:outputPanel> 
                        
                            <apex:outputPanel >
                         <apex:outputPanel id="opt1OP">        
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Option 1" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                        </apex:outputPanel>
                        
                        <apex:outputPanel layout="block" id="opt1CB">
                        <apex:inputCheckbox id="chckOpt1" value="{!val1}"/>
                                                           
                            <apex:outputLabel value="I am a sole practitioner" for="chckOpt1"/>
          
                        </apex:outputPanel>
                                </apex:outputPanel>
                               
                        <br></br>
                         
                        <apex:outputPanel id="opt2OP">
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Option 2" id="opt2lbl"/>
                        </apex:outputPanel>

                        <apex:outputPanel layout="block" >
                        <apex:inputCheckbox id="chckOpt2" value="{!val2}" />
                                                           
                            <apex:outputLabel value="I am employed by a corporation or partnership for="chckOpt2"/>
                           
                        </apex:outputPanel> 
                            </apex:outputPanel>
                          
                        <br></br>
                        <apex:outputPanel id="opt3OP">
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Option 3" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                        </apex:outputPanel>

                        <apex:outputPanel layout="block">
                        <apex:inputCheckbox id="chckOpt3" style="width:10px;height:10px;" value="{!val3}" onchange="check();"/>
                                                           
                            <apex:outputLabel value="I am employed by a Commonwealth/State/Local Government" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="chckOpt3"/>
                            
                        </apex:outputPanel> 
                        </apex:outputPanel>
                        <br></br>

                        <apex:outputPanel id="opt4OP">
                        <apex:outputPanel layout="block" styleClass="requiredBlock">
                        <apex:outputText value="Option 4"/>
                        </apex:outputPanel>

                        <apex:outputPanel layout="block">
                        <apex:inputCheckbox id="chckOpt4" style="width:10px;height:10px;" value="{!val4}"/>
                                                           
                            <apex:outputLabel value="I am not covered by a PII policyfor="chckOpt4"/>
                        </apex:outputPanel>
                        </apex:outputPanel></apex:outputPanel>


                    </apex:outputPanel>

                    <html>
                        <table style="width:100%">
                            
                       <tr style="width=100%;">
                           <td style="align:left;width:20%;"><apex:commandButton id="contBtn" value="Continue" action="{!enabletab2}" rerender="tabPanel" onclick="if (!checkRequiredFields()) return false;"/></td>
                           <td></td>
                          
                            </tr>
                       </table>
                </html>

                </apex:tab>
                <apex:tab label="NER Areas of Practice" name="nerAreas" id="nerAreas" style="background-color: white;" disabled="{!istab2disabled}">
                    
                    <apex:outputPanel layout="block" >   
                        
                         <apex:outputPanel layout="block" styleClass="headersmall">
                            <h1><apex:outputText value="NER Areas of Practice" style="font-family:Open Sans; font-weight:bold;"/></h1>
                        </apex:outputPanel>
                        <apex:outputPanel layout="block" styleClass="requiredBlock" id="ner1">
                        <apex:outputText value="Please select one or more Areas of Practice in which you are seeking NER registration." style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                        </apex:outputPanel>
                        
                        <apex:inputCheckbox id="nerchck1" style="width:10px;height:10px;" value="{!val1}" />
                                                           
                            <apex:outputLabel value="Biomedical" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck1"/>
                        <br></br>
                        <apex:inputCheckbox id="nerchck2" style="width:10px;height:10px;" value="{!val1}" />
                                                           
                            <apex:outputLabel value="Chemical" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck2"/>
                        <br></br>
                         <apex:inputCheckbox id="nerchck3" style="width:10px;height:10px;" value="{!val1}" />
                                                           
                            <apex:outputLabel value="Civil" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck3"/>
                        <br></br>
                         <apex:inputCheckbox id="nerchck4" style="width:10px;height:10px;" value="{!val1}" />
                                                           
                            <apex:outputLabel value="Electrical" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="nerchck4"/>
                        <br></br>
                           
                           
                        <apex:outputText id="errNER" value="Error: Please select at least one option" style="color:red;display:none;font-family:Open Sans;"/>
                   
                    </apex:outputPanel>
                    <html>
                        <table style="width:100%">
                            
                       <tr style="width=100%;">
                           <td style="align:left;width:20%;"><apex:commandButton id="contNerBtn" value="Continue" action="{!enabletab3}" rerender="tabPanel" onclick="if (!checkNER()) return false;"/></td>
                           <td><apex:commandLink value="Previous" action="{!enabletab1}" rerender="tabPanel" style="font-family:Open Sans; font-weight:bold;"/></td>
                           
                           </tr>
                       </table>
                </html>
                </apex:tab>
                
        
            </apex:tabPanel>

        </apex:outputPanel>
        
    </apex:form>
    <script type="text/javascript">

    
    function checkRequiredFields() {
           
            var err = false;
            var exstMemb = document.getElementById('j_id0:frm:exstEAMem');
            var memNo = document.getElementById('j_id0:frm:eaId');
            var firstName = document.getElementById('j_id0:frm:frstName');
            var lastName = document.getElementById('j_id0:frm:lastName');
            var email = document.getElementById('j_id0:frm:emlAddress');
            var phNo = document.getElementById('j_id0:frm:phNumber');
            var selState = document.getElementById('j_id0:frm:state');
           
         
            if(exstMemb.value == 'select'){
                document.getElementById('j_id0:frm:errexstEAMem').style.display = "block";
                err= true;
            }
            if(exstMemb.value != 'select'){
                document.getElementById('j_id0:frm:errexstEAMem').style.display = "none";
                err=false;
            }
            if(memNo.value==''){
                document.getElementById('j_id0:frm:erreaId').style.display = "block";
                err= true;
            }
            else if(memNo.value != ''){
                document.getElementById('j_id0:frm:erreaId').style.display = "none";
                err=false;
                
            }
            if(firstName.value==''){
                document.getElementById('j_id0:frm:errfrstName').style.display = "block";
                err= true;
            }
          
     
            return !err;
        }

        
    </script>
</apex:page>
Controller:
 
public class NERController {
    
    public ApexPages.StandardController standardContactController;
    public String selectedTab;
    public Case objCase;
   
    public List<SelectOption> types{
        get{
            
            types = new List<SelectOption>();
             Schema.sObjectType sobject_type = objCase.getSObjectType();
            Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe();
             Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap();
            List<Schema.PicklistEntry> pick_list_values = field_map.get('Evidence_of_Engineering_qualification__c').getDescribe().getPickListValues();
            for (Schema.PicklistEntry a : pick_list_values) {
               types.add(new selectOption(a.getLabel(), a.getValue()));
              }
          
          return types;
        }
        set;}
    Public Attachment myfile{
        get {
          if (myfile == null)
            myfile = new Attachment();
          return myfile;
        }
      set;
  }
       
    public NERController.NERController(ApexPages.StandardController controller){
        standardContactController = controller;
        this.objCase =(Case) controller.getRecord();
        myfile = new Attachment();
        selectedTab = 'regEligibility';
    }
    
    public string getselectedtab() {
     return selectedtab;
      }
    
    public boolean getistab1disabled() {
        return selectedTab <> 'regEligibility';
      }

      public boolean getistab2disabled() {
        return selectedTab <> 'nerAreas';
      }
    
    public void enabletab1() {
        selectedtab = 'regEligibility';
      }

      public void enabletab2() {
        selectedtab = 'nerAreas';
      }
    
   
    public Id createCase(){
          
        Id ftRecTypeId = [SELECT Id from recordType where name='National Engineering Register' and sObjectType='Case' LIMIT 1].id;
      
       
        Id gatewayId = [Select Id from ChargentBase__Gateway__c where Name='eWay Gateway' LIMIT 1].Id;
         Case insCase = new Case();
       
             insCase.RecordTypeId = ftRecTypeId;
            insCase.Status = 'New';
            insCase.Origin = 'Web';
            
           
            insert insCase;
        return insCase.Id;
    }
 }


 
Hi,

I am building a Visualforce page for our force.com site. I am running into a formatting issue when I try to rerender. I have 4 Checkbox option buttons. If anyone is selected others have to be collapsed. Currently I have implemented the actionSupport only for first checkbox. Other 3 checkboxes collpase properly. But if I uncheck option1 formatting for other 3 is lost. How can I resolve this issue. PFB the code for checkboxes:
 
<apex:outputPanel layout="block" styleClass="requiredBlock" id="opt1OP">
    					<apex:outputText value="Option 1" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
						</apex:outputPanel>
						
						<apex:outputPanel layout="block" id="opt1CB">
                        <apex:inputCheckbox id="chckOpt1" style="width:10px;height:10px;" value="{!val1}" />
                                                           
                            <apex:outputLabel value="I am a sole practitioner" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="chckOpt1"/>
                            <apex:actionSupport event="onchange" reRender="opt2OP,opt3OP,opt4OP" action="{!find}"/>
                            
                        </apex:outputPanel>
						<br></br>

						<apex:outputPanel id="opt2OP">
						<apex:outputPanel layout="block" styleClass="requiredBlock" rendered="{!NOT(val1)}">
    					<apex:outputText value="Option 2" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
						</apex:outputPanel>

						<apex:outputPanel layout="block" rendered="{!NOT(val1)}">
                        <apex:inputCheckbox id="chckOpt2" style="width:10px;height:10px;" value="{!val2}" />
                                                           
                            <apex:outputLabel value="I am employed by a corporation or partnership" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="chckOpt2"/>
                            <apex:outputText value="Please enter your Employer's Name" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                            <apex:inputText value="{!case.Employer_s_Name__c}" id="empNameOpt2" styleClass="inputText" style="font-family:Open Sans;"/>
                        </apex:outputPanel> 
						</apex:outputPanel>
						<br></br>
						<apex:outputPanel id="opt3OP">
						<apex:outputPanel layout="block" styleClass="requiredBlock" rendered="{!NOT(val1)}">
    					<apex:outputText value="Option 3" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
						</apex:outputPanel>

						<apex:outputPanel layout="block" rendered="{!NOT(val1)}">
                        <apex:inputCheckbox id="chckOpt3" style="width:10px;height:10px;" value="{!val3}"/>
                                                           
                            <apex:outputLabel value="I am employed by a Commonwealth/State/Local Government" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="chckOpt3"/>
                            <apex:outputText value="Please enter your Employer's Name" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
                            <apex:inputText value="{!case.Employer_s_Name__c}" id="empNameOpt3" styleClass="inputText" style="font-family:Open Sans;"/>
                        </apex:outputPanel> 
						</apex:outputPanel>
						<br></br>

						<apex:outputPanel id="opt4OP">
						<apex:outputPanel layout="block" styleClass="requiredBlock" rendered="{!NOT(val1)}">
    					<apex:outputText value="Option 4" style="font-family:Open Sans; font-size:15px; font-weight:bold;"/>
						</apex:outputPanel>

						<apex:outputPanel layout="block" rendered="{!NOT(val1)}">
                        <apex:inputCheckbox id="chckOpt4" style="width:10px;height:10px;" value="{!val4}"/>
                                                           
                            <apex:outputLabel value="I am not covered by a policy" style="font-family:Open Sans; font-size:15px; font-weight:bold; color:black;" for="chckOpt4"/>
                        </apex:outputPanel>
						</apex:outputPanel>

Thanks in Advance.
Hi expperts,

Need suggestions on below use case:

I have to create a button on Account Detail page to open a screen with a dropdown having names of associated Contact Roles. AccountContactRoles object is not customizable so I was thinking of creating a flow which would use an apex method defined using @invocableMethod annotation to find associated Contact Role names. Issues:

1) I created a collection variable to hold the output from the method. But I am not able to select that from Target dropdown. If I create new Collection variable I get error as "DataType of resource you entered does not match. Am I missing something here?Error screenshot"

2) How can dropdown (choice or dynamic choice) in a screen be populated using these values?

OR should I rather concentrate on Visualforce page?

Thanks in Advance,
Vandana
I have a set of apex:inputText fields. I am trying to validate mandatory fields and display error messages next to fields. The code I have is:
 
<apex:page standardController="Case" extensions="MSAFTController" showHeader="false" standardStylesheets="true">
    
    <apex:includeScript id="script2" value="{!URLFOR($Resource.ChargentCases__CreditCardJS, 'bililiteRange.js')}" loadOnReady="false"/>
    <meta http-equiv="X-Frame-Options" content="deny" />
    <script>
        if( self == top ) {
            document.documentElement.style.display = 'block' ;
        } else {
            top.location = self.location ;
        }
    </script>

    <!--<apex:pageMessages id="msgs"/>-->
    
    <apex:outputPanel layout="block" styleClass="page">

    <apex:stylesheet value="{!URLFOR($Resource.ChargentCases__CreditCardJS, 'style.css')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.ChargentCases__CreditCardJS, 'sitepaymentStyle.css')}"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

    <style>
        @-moz-document url-prefix() {
            .ccjs-card .ccjs-expiration:after {
                top: 0em !important;
            }
        }
    </style>
    <apex:form id="frm">   
        <!--<apex:commandButton value="Submit Page" action="{!myMethod}"/>   -->
            <apex:panelGrid columns="1" styleClass="info" width="100%">
        <apex:pageBlock mode="edit" id="pblck">
            <!--<apex:pageblockbuttons >
                <apex:commandbutton value="Submit" action="{!submit}" />
                <apex:commandbutton value="Cancel" action="{!Cancel}"/>
            </apex:pageblockbuttons>-->
                
                    
            <apex:pageblocksection id="FTDetails" title="MSA Fast Track">
            
                <!--<div class="ccjs-card" id="innerForm">-->
                    <apex:panelGrid columns="1" styleClass="info" >
                 <apex:pageBlockSectionItem >
                    <!--<apex:outputLabel for="MSA Application Number">MSA Application Number</apex:outputLabel>-->
                        
                        
                     <apex:outputText value="MSA Application Number" />   
                        <apex:inputText value="{!case.MSA_Application_Number__c}" styleClass="inputText" />
                         
                        
                    <!--<apex:inputField id="msaAppNo" value="{!case.MSA_Application_Number__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                        
                        
                        <apex:outputText value="Applicatnt's EA ID" /> 
                        <apex:outputPanel >
                        <div class="requiredInput" id="divInp">
                        <div class="requiredBlock" id="divReq"></div>
                        <!--apex:inputText value="{!case.Applicatnt_s_EA_ID__c}" id="appEAID" styleClass="inputText" required="true"/>-->
                        <apex:inputText value="{!msaAppEAID}" id="appEAID" styleClass="inputText" rendered="{!LEN(errorMessage)==0}"/>
                        <!--<apex:outputText id="errEAID" value="errorMessage" styleClass="classErrorClass" rendered="{!LEN(errorMessage)>0}"/>-->
                        <apex:outputPanel rendered="{!LEN(errorMessage)!=0}">
                         <apex:inputText styleClass="error" value="{!msaAppEAID}"/>
                         <div class="errorMsg"><strong>Error:</strong>&nbsp;{!msaAppEAID}</div>
                       </apex:outputPanel>  
                        </div>
                        </apex:outputPanel>
                        
                    <!--<apex:outputLabel for="Applicatnt's EA ID">Applicatnt's EA ID</apex:outputLabel>
                    <apex:inputField required="true" id="msaAppEAID" value="{!case.Applicatnt_s_EA_ID__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>        
                <apex:pageBlockSectionItem >
                        
                        <apex:outputText value="Applicant's Full Name" />
                        <apex:outputPanel >
                        <div class="requiredInput">
                        <div class="requiredBlock"></div>
                        <apex:inputText value="{!case.Applicants_Full_Name__c}" styleClass="inputText" required="true"/>
                        <!--<apex:outputText id="errEAID" value="Error: You must enter a value" style="color:red;display:none"/>-->
                        <!--<apex:outputText value="{!errorMessage}" style="color:red;display:none" rendered="{!LEN(errorMessage)>0}"/>-->
                        </div>
                        </apex:outputPanel>
                    <!--<apex:outputLabel for="Applicant's Full Name">Applicant's Full Name</apex:outputLabel>
                    <apex:inputField required="true" id="msaAppFullName" value="{!case.Applicants_Full_Name__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                         <apex:outputText value="Applicant's email address" />   
                        <apex:inputText value="{!case.Applicant_s_email_address__c}" styleClass="inputText" required="true"/>
                    <!--<apex:outputLabel for="Applicant's email address">Applicant's email address</apex:outputLabel>
                    <apex:inputField id="msaAppEmail" value="{!case.Applicant_s_email_address__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                        <apex:outputText value="Payee's Full Name" />
                         <apex:outputPanel >
                        <div class="requiredInput">
                        <div class="requiredBlock"></div>
                        <apex:inputText value="{!case.Payees_Full_Name__c}" styleClass="inputText" required="true"/>
                        </div>
                        </apex:outputPanel>
                    <!--<apex:outputLabel for="Payees Full Name">Payees Full Name</apex:outputLabel>
                    <apex:inputField required="true" id="msaPayeeFN" value="{!case.Payees_Full_Name__c}" />-->
                        
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                         <apex:outputText value="Contact email address" />
                         <apex:outputPanel >
                        <div class="requiredInput">
                        <div class="requiredBlock"></div>
                        <apex:inputText value="{!case.Contact_email_address__c}" styleClass="inputText" required="true"/>
                        </div>
                        </apex:outputPanel>
                    <!--<apex:outputLabel for="Contact email address">Contact email address</apex:outputLabel>
                    <apex:inputField required="true" id="msaContactEmail" value="{!case.Contact_email_address__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >        </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                        <apex:outputText value="Additional Information" />   
                        <apex:inputTextarea value="{!case.Additional_Information__c}"  required="true" rows="10"/>
                    <!--<apex:outputLabel for="Additional Information">Additional Information</apex:outputLabel>
                    <apex:inputField id="msaAddnlInfo" value="{!case.Additional_Information__c}" />-->
                </apex:pageBlockSectionItem>
                <apex:outputPanel layout="block" styleClass="btns">
                    <!--<apex:commandButton value="Submit" action="{!charge}"  rerender="msgs"/>-->
                    <apex:commandButton value="Submit" action="{!charge}" />    
                    <apex:commandButton value="Cancel" action="{!Cancel}"/>
                </apex:outputPanel> 
              </apex:panelGrid>
 <!-- onclick="if (!checkRequiredFields()) return false;" -->                       
            </apex:pageblocksection>
                          
                         
           <!--</div>-->
                        
                        
        </apex:pageBlock>
         
        </apex:panelGrid>
    </apex:form>
    </apex:outputPanel>
    <script type="text/javascript">
 
                        
</apex:page>

Controller:
 
public class MSAFTController {
    
    public String msaAppEAID {get;set;}
    public String errorMessage {get;set;}
    //public String classErrorClass {get;set;}
    
    
    public ApexPages.StandardController standardContactController;
    private string req_param;
    private Case msaCase;
   
    public MSAFTController.MSAFTController(ApexPages.StandardController controller){
        standardContactController = controller;
        msaCase =(Case) controller.getRecord();
        errorMessage = '';
    }
    
    public Id createCase(){
        Id ftRecTypeId = [SELECT Id from recordType where name='MSA Fast Track' and sObjectType='Case' LIMIT 1].id;
       
        Id ctId = [Select Id from Contact where EA_Member_No__c=: msaCase.Applicatnt_s_EA_ID__c LIMIT 1].Id;
        Id gatewayId = [Select Id from ChargentBase__Gateway__c where Name='eWay Gateway' LIMIT 1].Id;
        Case insCase = new Case();
        insCase.RecordTypeId = ftRecTypeId;
        insCase.Status = 'New';
        insCase.Origin = 'Web';
        insCase.ContactId = ctId;
        insCase.ChargentCases__Amount__c = 120.0;
        insCase.ChargentCases__Payment_Method__c = 'Credit Card';
        insCase.MSA_Application_Number__c = msaCase.MSA_Application_Number__c;
        //insCase.MSA_Application_Number__c = msaAppEAID;
        insCase.Applicants_Full_Name__c = msaCase.Applicants_Full_Name__c;
        insCase.Applicatnt_s_EA_ID__c = msaCase.Applicatnt_s_EA_ID__c;
        insCase.Applicant_s_email_address__c = msaCase.Applicant_s_email_address__c;
        insCase.Payees_Full_Name__c = msaCase.Payees_Full_Name__c;
        insCase.Contact_email_address__c = msaCase.Contact_email_address__c;
        insCase.Additional_Information__c = msaCase.Additional_Information__c;
       
        insCase.ChargentCases__Gateway__c = gatewayId;
        insert insCase;
        System.debug('insCaseId>>>' + insCase.Id);
        return insCase.Id;
    }
    
       
    public pageReference charge(){
        System.debug('Ind=side submit function*****************');
        if(msaAppEAID == '' || msaAppEAID == null){
            errorMessage = 'Required Field Empty';
        }
        //boolean errorInSave = validate();
        //System.debug('errorInSave >>>>>>>>>' + errorInSave);
        //if(errorInSave != true){
        Id caseId = createCase();
        
        /* Appfrontier Added */
        ChargentCases__Payment_Request__c pReq = [Select ChargentCases__Pay_Link__c From ChargentCases__Payment_Request__c Where ChargentCases__Case__c = :caseID And ChargentCases__Status__c != 'Paid'];
        
        Pagereference pr = New PageReference(pReq.ChargentCases__Pay_Link__c);
        return pr;
        //}
        
        /* End Appfrontier Add */
        /*
        req_param = apexPages.currentPage().getParameters().get('req');
        System.debug('req_param>>>' + req_param);
        //Pagereference pr1 = new Pagereference('/apex/ChargentCases_SitePayment');
        Pagereference pr = Page.MSA_CCDetailsPage;
        //Pagereference pr = Page.MSA_StartPage;
        pr.getParameters().put('req',caseId); 
        //pr1.getParameters().put('req','%2FLVo2VwkvkZp3PG61h2oGDuYMIpLmDd%2BvBl93XXn%2FKiHqplGvB5gbrkp7YJ4xIif3W1wDKcFZlfGrHHJPPeGwIMzcEQxld1nkulatNzGZB4%3D'); 
        //System.debug('pr1 in submit >>>' + pr1); 
        System.debug('pr in submit >>>' + pr);
        //pr.setRedirect(true);
        //ChargentCases.TChargentOperations.TChargentResult rs= ChargentCases.TChargentOperations.ChargeCase_Click(caseId );
       // System.debug('rs >>>>>' + rs);
        return pr;    
        */
    }
    
    /*public boolean validate() {
        boolean error = false;
        System.debug('In Validate>>>');
        System.debug('msaAppEAID>>>' + msaAppEAID);
        if ((insCase.Applicatnt_s_EA_ID__c == '') || (insCase.Applicatnt_s_EA_ID__c == null)) {
            System.debug('msaCase.Applicatnt_s_EA_ID__c is blank');
            classErrorClass = 'errorClass';  
            // put the errorclass, red borders<br>         
            errorMessage = 'Postal code not found'; 
            error = true;
            return error;
        } else {
            classErrorClass = '';
            errorMessage = ''; 
            error = false;
            return error;
        }
        return error;
       //return null;
        
    }*/

}

Currently I am trying this only for Applicatnt's EA ID field but when I click on Submit nothing happens. The debug statements in charge() are not called and nor is any error displayed. Am I missing anything here?

Thanks,
Vandana
I have created a Javascriptbutton on Cases to create Tasks for users after a number of days (entered in prompt box). It is working fine for users in Sydney timezone. But is givivng issues for users in Adelaide. I am unable to figure out the cause. Any hints would be appreciated.
 
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")} 

try{ 
var numDays = prompt("Please enter number of days after which you want to contact", "0"); 

var exstTask = sforce.connection.query("SELECT Id, Status from Task where whoId='{!Case.ContactId}' and WhatId = '{!Case.Id}' and subject like '%Contact Attempt%'"); 

var tskRec = exstTask.getArray("records"); 


for(var i=0; i< tskRec.length; i++){ 

var taskToClose = new sforce.SObject("Task"); 
taskToClose.Id = tskRec[i].Id; 

taskToClose.Status = 'Compeleted'; 
var resultUpdate = 
sforce.connection.update([taskToClose]); 
if(resultUpdate [0].success != "true"){ 
//alert('An error occurred while Closing task ' + resultUpdate[0].errors.message); 
} 
} 

alert('Please do not click any other button. Action In Progress...'); 

var taskToCreate = new sforce.SObject("Task"); 

var recType = sforce.connection.query("SELECT Id from RecordType where name='General' and sObjectType = 'Task'"); 
var records = recType.getArray("records"); 
taskToCreate.RecordTypeId = records[0].Id; 


taskToCreate.OwnerId = "{!$User.Id}"; 

taskToCreate.WhatId = "{!Case.Id}"; 

taskToCreate.WhoId = "{!Case.ContactId}"; 
var num = tskRec.length+1; 
taskToCreate.Subject = "Contact Attempt " + num.toString(); 

//taskToCreate.ActivityDate = new Date(); 
var date1 = new Date(); 
alert('offset>>>' + date1.getTimezoneOffset()); 

date1.setDate(date1.getDate()+parseInt(numDays)); 

var date2 =((date1.getMonth()+1)+"/"+(date1.getDate())+"/"+date1.getFullYear()); 

taskToCreate.ActivityDate = new Date(date2); 
taskToCreate.Type = "Call Attempt"; 

taskToCreate.Priority = "Normal"; 
taskToCreate.Status = "Not Started"; 

taskToCreate.IsReminderSet = "true"; 
taskToCreate.ReminderDateTime = new Date(date2); 

alert('task created>>>>>' + taskToCreate); 
result = sforce.connection.create([taskToCreate]); 


if(result[0].success == "true"){ 
alert('Task has been created successfully.'); 
var caseToUpdate = new sforce.SObject("Case"); 
caseToUpdate.Id = "{!Case.Id}" 
caseToUpdate.Contact_Attempt__c = num; 
caseToUpdate.Last_Contact_Date__c = new Date(); 
var resultUpdate = 
sforce.connection.update([caseToUpdate]); 
location.reload(); 
} 
else{ 
alert( 
"An Error has Occurred. Error: \r\n" + 
result[0].errors.message 
); 
} 
} 
catch(e){ 
alert( 
"An Un-expected Error has Occurred. Error: \r\n" + 
e 
); 
}

User-added image
I have a Visualforce page containing HTML elements like:
 
<label for="firstName">First Name<span style="color: red;">*</span></label></b>
            <br></br>
            <input type="text" name="fName" id="fName"> </input>
            
			 
        	 <br></br>
			<b><label for="lastName">Last Name<span style="color: red;">*</span></label></b>
            <br></br>
            <input type="text" name="lName" for="lName" id="lName" > </input>

How can I validate these fields before submitting the form? The validations have to be for

Mandatory fields
Email format

Thanks in Advance
I'm using lightning component and I have create two component like below.

navigateSampleView1.cmp
<aura:component implements='force:appHostable'> <ui:button aura:id="normal" label="Go to SampleView2" press="{!c.pressButton}"/> </aura:component>

navigateSampleView1Controller.js
({ pressButton: function(component, event, helper) { var evt = $A.get("e.force:navigateToComponent"); evt.setParams({ componentDef: "c:navigateSampleView2", componentAttributes: { whom: "Lightning" } }); evt.fire(); } })

navigateSampleView2.cmp
<aura:component> <aura:attribute name="whom" type="String" default="world"/> Hello {!v.whom}! </aura:component>

Now, what I want to do is that navigate from navigateSampleView1 to navigateSampleView2, but the error is happened, please help me out!!
The error is "Uncaught error in $A.run() : Unknown component: markup://c:navigateSampleView2"