• subaa
  • NEWBIE
  • 125 Points
  • Member since 2011

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 44
    Questions
  • 31
    Replies
Hi,
I was trying to download 'Salesforce Lightning for Outlook' add-ins from Microsoft AppSource website. I unable to download it. Can anyone guide me the steps required to download it? Are there some other links to download it? Please confirm.

Hi,

 

I need to hide/disable/override Add button of Account Team section - so that I can prevent Account Team Member creation from Salesforce UI and make it doable via webservice only, as requested.

 

I revoked the Account Edit access for non Admin profile users. So that they cannot add Account Team Member to accounts that they are not own.

 

However, I couldnt stop Account Owners and System Admin users from creating Account Team Member thru UI. So, thinking of overridding the Add button to prevent account team creation.

 

Can anyone share me the workaround to fix this scenario.

 

Regards,

SuBaa

Hi,

 

I got a requirement to launch one of the Account list view by default, when Account tab is clicked. I able to redirect to the Account List view using the below visualforce content.

 

<apex:page action="{!URLFOR($Action.Account.List, $ObjectType.Account)}" />

 

However, I couldn't control the launch of dedicated List view by default; It shows me the last visited list view instead. I should not delete other Views to launch the expected View by default.

 

Can anyone help me to control the List view in visualforce page?

 

Regards,

SuBaa

Hi,

 

I used the AuthServlet sample code in my org to test REST API functionality. I able to reach upto Salesforce login page. But when I gave my credential, it throws the following error.

 

java.lang.IllegalStateException

at org.apache.catalina.connector.ResponseFacade.sendRedirect(

ResponseFacade.java:435)....

 

doGet method in AuthServlet.java sample code (http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_REST_API), that I used is,

 

protected void doGet(HttpServletRequest request,
   HttpServletResponse response) throws ServletException, IOException {
  
  String accessToken = (String) request.getSession().getAttribute(
    ACCESS_TOKEN);
  
  if (accessToken == null) {
   String instanceUrl = null;

   if (request.getRequestURI().endsWith("oauth")) {
    // we need to send the user to authorize
    response.sendRedirect(authUrl);
    return;
   } else {
    System.out.println("Auth successful - got callback");

    String code = request.getParameter("code");

    HttpClient httpclient = new HttpClient();

    PostMethod post = new PostMethod(tokenUrl);
    post.addParameter("code", code);
    post.addParameter("grant_type", "authorization_code");
    //post.addParameter("grant_type", "password");
    post.addParameter("client_id", clientId);
    post.addParameter("client_secret", clientSecret);
    post.addParameter("redirect_uri", redirectUri);

    try {
     httpclient.executeMethod(post);

     try {
      JSONObject authResponse = new JSONObject(
        new JSONTokener(new InputStreamReader(
          post.getResponseBodyAsStream())));
      System.out.println("Auth response: "
        + authResponse.toString(2));

      accessToken = authResponse.getString("access_token");
      instanceUrl = authResponse.getString("instance_url");

      System.out.println("Got access token: " + accessToken);
     } catch (JSONException e) {
      e.printStackTrace();
      throw new ServletException(e);
     }
    } finally {
     post.releaseConnection();
    }
   }

   // Set a session attribute so that other servlets can get the access
   // token
   request.getSession().setAttribute(ACCESS_TOKEN, accessToken);

   // We also get the instance URL from the OAuth response, so set it
   // in the session too
   request.getSession().setAttribute(INSTANCE_URL, instanceUrl);
  }
  response.sendRedirect(request.getContextPath() + "/DemoREST");
 }

 

I read some where like, response is already commited for the request and hence it throws the error. Can anyone help me, how to call our servlet once the credentials provided in the Salesforce login page.

Hi,

 

I need to log in to Salesforce through my company intranet application. Especially, the My Chatter page in Salesforce Chatter application should be displayed without asking me the password (ie., username alone should be entered) Once the page launched or session created, if I initiate the same request with my group member name, it should launch his/her 'My Chatter' page. Can anyone suggest me the solution for this requirement.

 

Regards,

SuBaa

Hi,

 

Can we access the 'Chatter Messenger' feature thru Chatter API from a third party application (client)? Please comment on the possibility of following chat device applications,

 

Salesforce browser <> Client's Messenger

Client 1's Messenger <> Client 2's Messenger

 

Regards,

SuBaa

 

 

Hi,

 

Can we use Chatter API without the knowledge of OAuth protocol? Assume that I want to use Chatter data in my Java application and no matters of securing my (user's) credential from that java application.

 

Regards,

SuBaa

Hi,

 

I got the below error, when I create Lead record from Java application using Partner WSDL web service call.

 

AxisFault
 faultCode: UNKNOWN_EXCEPTION
 faultSubcode:
 faultString: UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
 faultActor:
 faultNode:
 faultDetail:
    {urn:fault.partner.soap.sforce.com}UnexpectedErrorFault:<ns1:exceptionCode>UNKNOWN_EXCEPTION</ns1:exceptionCode><ns1:exceptionMessage>Destination URL not reset. The URL returned from login must be set in the SforceService</ns1:exceptionMessage>

UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
    at com.sforce.soap.partner.fault.UnexpectedErrorFault.getDeserializer(UnexpectedErrorFault.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
    at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
    at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
    at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.sforce.soap.partner.SoapBindingStub.create(SoapBindingStub.java:2657)
    at org.teg.iagent.PartnerAgentProcessor.start(PartnerAgentProcessor.java:482)
    at org.teg.iagent.PartnerAgentProcessor.main(PartnerAgentProcessor.java:82)

 

and, below is my code to set field values, which I retrieved from a POJO object.

 

    public MessageElement createNewXmlElement(String Name, String nodeValue) throws Exception {

        MessageElement msgElement;
        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
        Document document = documentBuilder.newDocument();
        
        Element xmlEle = document.createElement(Name);
        xmlEle.appendChild(document.createTextNode(nodeValue));

        msgElement = new MessageElement(xmlEle);

        return msgElement;
    }

 

I found similar issue in the forum and I am sure, I never called getUserinfo method before the session created. Can anyone help me out from this issue.

 

Regards,

SuBaa

I am new to apex programming.

I am writing a webservice class. Many of the functions I need is already available in one of the base class. But when I extend the base class in webservice class & call the functions, I get the error that method doesnot exist or incorrect signature. I googled and found that the static methods cannot override other method.

Is there a different way to implement the functions I already have in the webservice class?

Ex:

// base class

global virtual class Base{

  public boolean setMember(){

  // code

  }

  public string getMemberName(){

  //code

  }

}

// webservice class

global class Child extends Base{

  WebService static string getMemberName(){

  // repeate same code

  }

  WebService boolean string setMember(){

  // repeate same code

  }

}

 

I know I could call the base class method in java. But it is not allowed in apex.

Is there a way to avoid repeating same code in both the classes?

 

Any ideas is appriciated.

Thanks in advance

Hi,

 

Can anyone explain me the steps to be followed to invoke an apex webservice from the Java application? It would be grateful if you attach some code samples or reference.

 

Regards,

SuBaa

Hi,

 

Is there, any way to display the confirmation dialog message box, upon deleting a Standard object record. The dialog box will display or not, upon the decision made in that object trigger code (using before Delete event).

 

Thanks in advance.

 

Regards,

SuBaa

Hi,

 

I am getting the error, 'Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 165.375KB' for one of the Visualforce page we used.

 

I could see some best practise to reduce this limit in Community. However, if anyone share me the way, you fixed this in your ORG would be more appreciated.

 

Thanks in advance.

 

Regards,

SuBaa

Hi,

 

We got a requirement to create VF page with four tables and each table may consist of 100+ records. It was requested to sort the table records using the distinct column header in each table. We wrote a sort method using bubble sort algorithm.

 

It is working perfectly for tables with less than of 100 records. But throws 'Too many script statements: 200001' error for tables with 120+ records. Especially, it throws an error when I perform sort function for descending order.

 

It seems that script statements count reset every time, when an action performed. But, it throws error, when I perform the sort function again for the same table.

 

Can anyone help me to fix this issue?

 

Regards,

SuBaa

Hi,

 

Is there any specific setting to enable field update through Workflow rule for a profile? I created a Workflow rule to update Owner Id field value of standard objects, when it created or edited. But it is not working.

 

FYI. I able to change the Owner Id field when the record is created.

 

Can any one help me, where should I change the setting to enable this?

 

Regards,

SuBaa

Hi,

 

We got a requirement to set TIME value for both Start and End date as '12:00:00', when a visit status (custom field) saved as 'Cancelled'. I inlcuded my logic inside the 'before update' trigger on Event object. I able to see the expected values in the debug log for both fields. But it is not reflected on Visit's detail page. Can anyone assist me to resolve this issue.

 

Regards,

SuBaa