• middha.vikram@gmail.com
  • NEWBIE
  • 50 Points
  • Member since 2011

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

I'm trying to create a map from a query list I created so I can access it by Id - here's the relevant code:

 

      List<User>userResults= new List<User>();
      set<Id>userIds = new Set<Id>();
      Map<Id,User>userData = new Map<Id,User>();

 

//code that fills user ids

 

    //get the relevant user data      
    userResults=[SELECT Id,MyField1__c,MyField2__c FROM User WHERE Id in: userIds];


    //put it into a map for easier access
    for (User u : userResults){
        userData.add(u.Id,u); //here's where the error is
    }

My List is of type User, the for loop u value is of type User and my map is Id, User so why doesn't it work?

Hi,

 

My requirement is to generate a pdf on click of a button. This button makes a web service calls and just displays the result on pdf. I generate this pdf as rendered from VF page. 

 

The problem here is that if the records that are returend from the webservice is < 6000, then it works fine. If the records are > 6000, I am getting VF heap size governor limit error. 

 

We need to email this pdf to the logged in user. 

 

Any thoughts on this ?

 

-Vikram

Hi,

 

By default, Opportunity related list on Accounts shows the label "Opportunity". Can I change it to something else without changing the name of Opportunity Object. Itself ?

 

 

Regards

Vikram

Hi,

 

Can anyone tell me that how to write a SOSL query for the query below ?

 

[select Id,Name frrom Asset where Name like '%abcd%']

 

I need to retreive all the Asset records whose name contains 'abcd'.

 

Regards

Vikram

Hi,

I have installed Orchestra CMS on my sandbox and did some development. Now I am planning to move it to Production. What is the best way of doing this as we can not move packages through eclispe to Production box.

 

Regards

Vikram

Hi All,

 

Is there any way I can hide a VF tab from all the Profiles ? There are many profiles. I dont want to go to each profile and do it. Is there any direct way of doing it in one shot. 

 

 

Regards

Vikram

I want to rename Clone button on Opportunity . Its a standard salesforce button. I am not finding any option to do it. Is it possible to do that ?

 

Regards

Vikram

Hi All,

 

Can anyone tell me that what is the limitation of Web service call outs from Salesforce. 

My requirement is that I need to run a scheduled apex class every 6 minutes and that call makes a web service call. I just wanted to know that is there any change it will hit salesforce limits ?

 

Thanks

Vikram 

Hi,

 

Is it possible to Schedule a apex class at interval of 5 minutes ? I want it to run after every 5 minutes. Is it possible in Salesforce. ?

 

Regards

Vikram

Hi,

 

I have a for loop in which I am calling a web service method of some other System. 

 

For(i=0;i<10;i++){

webserviceObject.method(parameter);

}

Problem here is that the call to webservice is asynchronous. Means before completing the first request, second request goes into that method and i get a error message from web service that "You have uncommitted work pending. Please commit or rollback before calling out" . I need to make sure that until first request is processed, second does not jumps in. Is there any way I can make this a synchronous process.

Thanks In Advance

Vikram

Hi,

 

Can anyone tell me that how to write a SOSL query for the query below ?

 

[select Id,Name frrom Asset where Name like '%abcd%']

 

I need to retreive all the Asset records whose name contains 'abcd'.

 

Regards

Vikram

Hi all,

 

I would like to send an email alert to the opportunity owner if he has not done any updates on his opportunity for last  15 days.

Please suggest how this could be done?

 

Thanx in advance

 

I want to rename Clone button on Opportunity . Its a standard salesforce button. I am not finding any option to do it. Is it possible to do that ?

 

Regards

Vikram

Hi All,

 

Can anyone tell me that what is the limitation of Web service call outs from Salesforce. 

My requirement is that I need to run a scheduled apex class every 6 minutes and that call makes a web service call. I just wanted to know that is there any change it will hit salesforce limits ?

 

Thanks

Vikram 

Hi there,

 

I have the following test code which updates a field in a related object (CustomObject__r).  The CustomObject is related to Opportunity and the code below runs through successfully.

 

Opportunity o = [select CustomObject__r.Market__c,StatusMessage__c from Opportunity where Id='00600000008HFNLAA5'];
           o.CustomObject__r.Market__c = 'test';
           o.StatusMessage__c = 'test update';
           
            try
            {
                Database.SaveResult srs = Database.update(o);
                if (srs.isSuccess())
                {
                     // successful
                }
            } catch (Exception e) {
                    ApexPages.addMessages(e);
            }      

 

The above code does not return an exception and also is successful based on the return value of isSuccess().  The StatusMessage__c in the main object is successfully updated, but the CustomObject__r.Market__c field does not get updated even though the update transaction as a whole is deemed successful.  Any troubleshooting ideas, or if the above update is not possible (ie. have to fetch back and update CustomObject__c directly)?

 

thanks

I created a number of VF pages for the object level help we are providing with our application.

 

I tried to upgrade the API version from 19.0 -> 21.0 and I keep getting the following error and the system does not allow me to save.  when i set the API version back to 19.0 I don't get this error.

 

any insight would be great!

 

 

Error: Element type "img" must be followed by either attribute specifications, ">" or "/>".

  • February 09, 2011
  • Like
  • 0

I'm trying to create a map from a query list I created so I can access it by Id - here's the relevant code:

 

      List<User>userResults= new List<User>();
      set<Id>userIds = new Set<Id>();
      Map<Id,User>userData = new Map<Id,User>();

 

//code that fills user ids

 

    //get the relevant user data      
    userResults=[SELECT Id,MyField1__c,MyField2__c FROM User WHERE Id in: userIds];


    //put it into a map for easier access
    for (User u : userResults){
        userData.add(u.Id,u); //here's where the error is
    }

My List is of type User, the for loop u value is of type User and my map is Id, User so why doesn't it work?

Hi,

 

Is it possible to Schedule a apex class at interval of 5 minutes ? I want it to run after every 5 minutes. Is it possible in Salesforce. ?

 

Regards

Vikram

hi,

Iam getting the below errors,when i tried executing the sample code.

An unexpected error has occurred: ; nested exception is:

java.net.ConnectException: Connection refused: connect

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.net.ConnectException: Connection refused: connect

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.&lt;init&gt;(Unknown Source)

at java.net.Socket.&lt;init&gt;(Unknown Source)

at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:103)

at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

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.enterprise.SoapBindingStub.login(SoapBindingStub.java:2200)

at Samples.login(Samples.java:84)

at Samples.run(Samples.java:325)

at Samples.main(Samples.java:37)

{http://xml.apache.org/axis/}hostname:hydhtc42322

java.net.ConnectException: Connection refused: connect

at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)

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.enterprise.SoapBindingStub.login(SoapBindingStub.java:2200)

at Samples.login(Samples.java:84)

at Samples.run(Samples.java:325)

at Samples.main(Samples.java:37)

Caused by: java.net.ConnectException: Connection refused: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:103)

at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)

at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

... 13 more

  • April 30, 2007
  • Like
  • 0