• mpoli
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies

Hi everyone,

I'm interested in displaying the owner name of a Case object, as well as other case details, on a page. Using Apex Explorer, I've noticed that I have access to 'OwnerId', labeled as a reference. However, I cannot access the owner (user) information directly in the same query.

I have actually been able to accomplish a similar feat (displaying the contact's name) using the ContactId reference, selecting 'ContactId, Contact.Name', but I apparently cannot do the same with the owner.

Has anybody found a way to drill down for deeper information such as this? Another option I see would be sticking all the owner id's in a long string, then querying for the names with the "IN" keyword, then manually matching them to their respective objects.

  • September 15, 2009
  • Like
  • 0

Hi everyone,

 

I'm currently working on a visualforce page that utilizes YUI's Drag and Drop. Dragging and dropping list elements is working quite nicely at the moment, so I've decided to add the ability for a user to double-click on a list element, shooting a signal via an actionFunction to have the page rerendered with that list element's outputFields replaced with inputFields (everything else rendered the same).

 

However, once the page rerenders, it does not retain all of the CSS that was applied. Using the Web Developer plugin for Firefox, I've found that the CSS for each of the ul-tags encapsulating the list items is lost in the rerendering process.

 

Has anybody experienced similar breakage in CSS when rerendering panels?

  • August 28, 2009
  • Like
  • 0
Hi, I'm trying to parse a large string (~6570 characters) in apex through splitting. Specifically, I have the whole string separated about evenly into 8 sections by pipe ('|') characters (so very roughly about 821 characters per list element).

These lists are split even further, but I have commented out that code, and I still receive the error

System.ListException: Split results in a list that exceeds limits

upon splitting the first, biggest string into just 8 segments.

I'm not sure if the big picture is needed, so I'll try to describe it as concisely as I can. In my visualforce page, the giant string is constructed in javascript, then sent through an actionFunction as a param to the apex code on the server side. The receiving method then sends the giant string to an asynchronous method that parses the string and updates approximately 150 records. It is in this function where the error occurs.

I do not understand what limit I am breaking, so I was hoping someone could please clarify. Has anyone else possibly run into the same or similar problem? Moreover, is there another method I can use to parse the string that would circumvent the issue? I'm still new to salesforce and apex/visualforce development, so I'm still learning these limitations and their corresponding workarounds.

Thank you.
  • August 18, 2009
  • Like
  • 0

Hi, I'm not sure if I'm posting this in the correct forum, so please direct me to the appropriate one if this isn't it.

 

Right off the bat, I should mention that I'm writing a standard Visualforce page that utilizes Apex code on the server, so I'm NOT using any s-controls, though I am exploring the possibility of using the AJAX toolkit.

 

I'm still pretty new to Apex/Visualforce, and I was wondering if it's possible to access my Apex methods from my Visuaforce page. Specifically, I'd like to pass a large string from my javascript to an asynchronous method in my Apex code on the server side for processing. The method will parse the string and eventually update a large number of records, the reason I chose to make it asynchronous. I figured I would accomplish this via the AJAX toolkit.

 

I understand that the AJAX toolkit allows one to perform operations, such as database query, merge, and update, but is it possible to use it to access custom methods? If not, I was wondering if someone could recommend another approach I should take to send information back to the Apex code?

 

Thank you.

  • August 10, 2009
  • Like
  • 0

Hi, I'm completely new to developing in Apex and Visualforce, so please bear with my elementary question.

 

I have a simple repeat block in my Visualforce page:

 

<apex:repeat value="{!stagesStrLst}" var="eachstage" id="theRepeat">
      {!curStageNum} {!eachstage} {!stageStr}

      <br/>
</apex:repeat>

 

'stagesStrLst' is a String list obtained from a SOQL query in my Apex code (8 elements in the list).

'stageStr' is a String variable with the following get method:

get
{
   String blockStr;
   blockStr = '<div class="workarea"> ';
   blockStr += '<h3>' + curStage + '</h3>';
   blockStr += ' </div>';
           
   System.debug(curStageNum);

   curStageNum++;

   System.debug(curStageNum);

   return blockStr;   
}

 

'curStage' simply returns the element of 'stagesStrLst' of index 'curStageNum', which is set to 0 in the controller's constructor. Every time stageStr's get method is called, it should increment curStageNum.

 In other words, what I think it should output on my Visualforce page is

0 a a

1 b b

2 c c

3 d d

4 e e

5 f f

6 g g

7 h h

 

where a, b... are the string elements in the list.

 

However, I instead get

0 a a

0 b a

0 c a

0 d a

0 e a

0 f a

0 g a

0 h a

It's looping through stagesStrLst just fine, but it seems curStageNum is never being incremented properly. In fact, the system log shows that the debug statements I inserted only output once (though the second debug statement reveals that curStageNum did indeed get incremented to 1, but that's never shown in the Visualforce page).

 

I'm pretty confused about this behavior and was wondering if someone could please explain why my Visualforce page never shows my integer variable being incremented? This was just a small test project to try get myself to understand what I can and can't do with Visualforce/Apex before I tackle a bigger, more functional project.

 

Thank you.

  • July 30, 2009
  • Like
  • 0
Hi, I'm trying to parse a large string (~6570 characters) in apex through splitting. Specifically, I have the whole string separated about evenly into 8 sections by pipe ('|') characters (so very roughly about 821 characters per list element).

These lists are split even further, but I have commented out that code, and I still receive the error

System.ListException: Split results in a list that exceeds limits

upon splitting the first, biggest string into just 8 segments.

I'm not sure if the big picture is needed, so I'll try to describe it as concisely as I can. In my visualforce page, the giant string is constructed in javascript, then sent through an actionFunction as a param to the apex code on the server side. The receiving method then sends the giant string to an asynchronous method that parses the string and updates approximately 150 records. It is in this function where the error occurs.

I do not understand what limit I am breaking, so I was hoping someone could please clarify. Has anyone else possibly run into the same or similar problem? Moreover, is there another method I can use to parse the string that would circumvent the issue? I'm still new to salesforce and apex/visualforce development, so I'm still learning these limitations and their corresponding workarounds.

Thank you.
  • August 18, 2009
  • Like
  • 0

Hi, I'm completely new to developing in Apex and Visualforce, so please bear with my elementary question.

 

I have a simple repeat block in my Visualforce page:

 

<apex:repeat value="{!stagesStrLst}" var="eachstage" id="theRepeat">
      {!curStageNum} {!eachstage} {!stageStr}

      <br/>
</apex:repeat>

 

'stagesStrLst' is a String list obtained from a SOQL query in my Apex code (8 elements in the list).

'stageStr' is a String variable with the following get method:

get
{
   String blockStr;
   blockStr = '<div class="workarea"> ';
   blockStr += '<h3>' + curStage + '</h3>';
   blockStr += ' </div>';
           
   System.debug(curStageNum);

   curStageNum++;

   System.debug(curStageNum);

   return blockStr;   
}

 

'curStage' simply returns the element of 'stagesStrLst' of index 'curStageNum', which is set to 0 in the controller's constructor. Every time stageStr's get method is called, it should increment curStageNum.

 In other words, what I think it should output on my Visualforce page is

0 a a

1 b b

2 c c

3 d d

4 e e

5 f f

6 g g

7 h h

 

where a, b... are the string elements in the list.

 

However, I instead get

0 a a

0 b a

0 c a

0 d a

0 e a

0 f a

0 g a

0 h a

It's looping through stagesStrLst just fine, but it seems curStageNum is never being incremented properly. In fact, the system log shows that the debug statements I inserted only output once (though the second debug statement reveals that curStageNum did indeed get incremented to 1, but that's never shown in the Visualforce page).

 

I'm pretty confused about this behavior and was wondering if someone could please explain why my Visualforce page never shows my integer variable being incremented? This was just a small test project to try get myself to understand what I can and can't do with Visualforce/Apex before I tackle a bigger, more functional project.

 

Thank you.

  • July 30, 2009
  • Like
  • 0