• maxout
  • NEWBIE
  • 50 Points
  • Member since 2011

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

Hi there,

It is to get user's org server/domain.

Trying Site.getCurrentSiteUrl, but it returns null.

In the context of trigger, there seems to be limitations.

Any idea appriciated.

 

Related:

http://boards.developerforce.com/t5/General-Development/Getting-Site-URL/m-p/109559

public id dummy;

public pagereference somemethod()

{

try{

 sometype obj=[select id from sometype where id=: dummy];

}catch(e)

{

  apexpage.addMessage();

}

return null;

}

testMethod()

{

  set dummy to null;

  call to somemethod();

}

 

Hi there,

When save, the test stop at the call to somemethod() with error:

System.QueryException: List has no rows for assignment to SObject.

But this error is supposed to be catched in the method itself.

Any idea appriciated?

 

 

 

Hi there,

Found a post that it  uses a loop to search the item as the link at the bottom.

Another one build a custom map with getKeyPrefix as the map key, where the map better maintained by the system as well.

And both using string.subString(0,3) to get the prefix, which is better provided with an API.

 

Is there any better practise?

 I mean, if there is a system API on 'Schema' which accepts an ID as parameter, returning the sobjecttype.

 

http://boards.developerforce.com/t5/General-Development/Reg-Finding-the-objectname-using-object-Id/m-p/261111#M53051

 

http://boards.developerforce.com/t5/Apex-Code-Development/Updating-Lead-or-Contact-based-on-a-Task/m-p/114550

 

Cheers

Hi, is it possible to create nested table on apex page using  pageBlockTable or other tags?

 

I got an erreor: Save error: Object type not accessible. Please check permissions and make sure the object is not in development mode: SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object. RequestAsPDF.page.

 

Using <apex:column breakbefore> and a controller extention could fill the child table content in a new row.

But is there anything already there to use? Thanks.

It is to pass current page context to linked custome page/function in the side bar.

 

Passing the object type and/or id in the current standard detail frame to other custome pabe.

 

Help appreciated.

 

related:

http://boards.developerforce.com/t5/Apex-Code-Development/Determining-Page-Context/td-p/114686

http://boards.developerforce.com/t5/General-Development/Call-Visualforce-page-from-javascript/m-p/114932

Another class deployed fails the coverage test while I want to update my class from IDE.

The problem is the system doesn't allow the update of my class.

Is it a normal system behavior?

 

related error:

http://boards.developerforce.com/t5/Apex-Code-Development/limit-of-10000-query-rows-in-APEX-class/td-p/278947

Got this at line 1 of my apex class from the problem list:

System.LimitException: Too many query locator rows: 10001

 

Had try to update a previous version with just comments, but still got the same error. 

The previous version was just sucessfully saved to server.

The location reported is not inside the class, like a SOQL. Any idea?

 

Have not begun to test yet before looking around.  Cheeers

 

 

Related:

http://boards.developerforce.com/t5/Apex-Code-Development/Question-regarding-limit-of-10000-query-rows-in-APEX-class/m-p/278941#M48686

Just finish a test.

After a record is deleted from the force, the same record cant be upserted mapping with ID, error saying 'record deleted'.

It seems like upsert only works for fields in a record, but not the record itself.

A separate insert does work, but a new ID is created.

This means ID cant be inserted into force. Right or not?

 

Keeping the ID might be needed when rebuilding a set of data.

 

A related post:

http://boards.developerforce.com/t5/General-Development/Can-I-use-the-ID-field-as-the-external-id-field-for-upserts-on/m-p/72368

  • January 21, 2011
  • Like
  • 0

Hi, is it possible to create nested table on apex page using  pageBlockTable or other tags?

 

I got an erreor: Save error: Object type not accessible. Please check permissions and make sure the object is not in development mode: SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object. RequestAsPDF.page.

 

Using <apex:column breakbefore> and a controller extention could fill the child table content in a new row.

But is there anything already there to use? Thanks.

Hi there,

It is to get user's org server/domain.

Trying Site.getCurrentSiteUrl, but it returns null.

In the context of trigger, there seems to be limitations.

Any idea appriciated.

 

Related:

http://boards.developerforce.com/t5/General-Development/Getting-Site-URL/m-p/109559

 

Hi there,

Found a post that it  uses a loop to search the item as the link at the bottom.

Another one build a custom map with getKeyPrefix as the map key, where the map better maintained by the system as well.

And both using string.subString(0,3) to get the prefix, which is better provided with an API.

 

Is there any better practise?

 I mean, if there is a system API on 'Schema' which accepts an ID as parameter, returning the sobjecttype.

 

http://boards.developerforce.com/t5/General-Development/Reg-Finding-the-objectname-using-object-Id/m-p/261111#M53051

 

http://boards.developerforce.com/t5/Apex-Code-Development/Updating-Lead-or-Contact-based-on-a-Task/m-p/114550

 

Cheers

Hi, is it possible to create nested table on apex page using  pageBlockTable or other tags?

 

I got an erreor: Save error: Object type not accessible. Please check permissions and make sure the object is not in development mode: SOQL statements cannot query aggregate relationships more than 1 level away from the root entity object. RequestAsPDF.page.

 

Using <apex:column breakbefore> and a controller extention could fill the child table content in a new row.

But is there anything already there to use? Thanks.

Another class deployed fails the coverage test while I want to update my class from IDE.

The problem is the system doesn't allow the update of my class.

Is it a normal system behavior?

 

related error:

http://boards.developerforce.com/t5/Apex-Code-Development/limit-of-10000-query-rows-in-APEX-class/td-p/278947

Got this at line 1 of my apex class from the problem list:

System.LimitException: Too many query locator rows: 10001

 

Had try to update a previous version with just comments, but still got the same error. 

The previous version was just sucessfully saved to server.

The location reported is not inside the class, like a SOQL. Any idea?

 

Have not begun to test yet before looking around.  Cheeers

 

 

Related:

http://boards.developerforce.com/t5/Apex-Code-Development/Question-regarding-limit-of-10000-query-rows-in-APEX-class/m-p/278941#M48686

I am referencing a "time picker" JQuery script in a custom component.  The component works fine except it will not save the time value to my sObject (Campaign)

 

I have tried using page controllers, component controllers, etc. and have just not been able to resolve this problem.  Thanks.

 

Here is the component:

<apex:component >
    <script src="{!URLFOR($Resource.JQuery)}" type="text/javascript" ></script>
    <script src="{!URLFOR($Resource.TimePicker,'/src/jquery.ptTimeSelect.js')}" type="text/javascript" ></script>
    <apex:stylesheet value="{!URLFOR($Resource.TimePicker,'/src/jquery.ptTimeSelect.css')}" ></apex:stylesheet>
    <apex:stylesheet value="{!URLFOR($Resource.TimePicker,'/example/ui.core.css')}" ></apex:stylesheet>
    <apex:stylesheet value="{!URLFOR($Resource.TimePicker,'/example/ui.theme.css')}" ></apex:stylesheet>
    <apex:stylesheet value="{!URLFOR($Resource.TimePicker,'/doc/styles/main.css')}" ></apex:stylesheet>
    <apex:stylesheet value="{!URLFOR($Resource.TimePicker,'/example/css/timecntr/jquery-ui-1.7.1.custom.css')}" ></apex:stylesheet>
    <!-- <apex:attribute name="pageController" assignTo="{!pageController}" description="The controller for the page." type="PageControllerBase" required="true"/>
    !-->
    <apex:attribute name="PickTimeField" description="Time field" type="string" required="true"></apex:attribute>
    <apex:attribute name="PickTimeLabel" description="Time Label" type="string" required="false"></apex:attribute>
    <apex:attribute name="value" description="" type="string" required="false" ></apex:attribute>

    <!--<apex:inputText id="PickTimeField" value="{!value}"/>
       NOTE:  <apex:inputText will not work because it will not allow you to use a variable id (i.e., it must be hard-coded ---  	unless the API version is changed to 15.0 - and then I received other errors.  Using the HTML tag <Input DOES allow you to 
       use a variable id (e.g., id="{!PickTimeField}")
    !-->
    
      <input id="{!PickTimeField}" value="{!value}" style="width:60px;font-family:Arial; font-size:.8m" />
      <script type="text/javascript">
      
        $(document).ready(function() {
            $('#{!PickTimeField}').ptTimeSelect();
      });
     </script>
   </apex:component>

 

Here is the VF page:

<apex:page standardController="Campaign" >
    <apex:form  >
       <apex:outputPanel id="time">>
           <c:TimePicker PickTimeField="EndTime"  value="{!Campaign.endTime__c}"  />
       </apex:outputPanel>
       <apex:commandButton value="Save" action="{!save}" rerender="time"/>
    </apex:form>
</apex:page>

 

 

  • April 17, 2010
  • Like
  • 0

Hi Friends,

 

Going through the facts mentioned in the apex documentation, it seems that the limit of 10000 query rows when the entry point is an APEX class is applicable to the total cumulative count of all the queries which are a part of that class.

 

For e.g, if i have 5 different queries as part of the same APEX controller class and each one of them retrieves 2001 records, then i would get an exception stating: "Too many query rows - 10005" ??

 

Just want to confirm if my understanding here is correct. Because till now my understanding was that it is applicable to each individual query!!

 

Thanks a ton!!

Cool_D

Is there a way using Apex code to determine the page context being displayed in the main Salesforce page frame?

 

I'd like to create a link in the sidebar to a help page which would recognize the context of what was being displayed in the main frame.  Is there any way for me to determine what object or visual force page is being displayed?  Can I obtain the URL?  For those pages without much information in the URL, can I obtain the action that caused the currently displayed page to be displayed?

 

Any help, ideas, or alternate suggestions would be appreciated.

 

Thanks,

Jeff

 

 

  • February 26, 2009
  • Like
  • 0