function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Big EarsBig Ears 

Case Feed - Custom Action Help

All,

 

I'm trying to create a simple Custom Action using the Case Feed developer guide documentation. I simply want a new action which is, effectively, a tab to fill out the important fields on a new case. I'm having a couple issues:

 

  1. The documentation says it's as simple as adding a new visualforce page, but it seems that the standard styling and field bindings don't work in quite the same way. When using <apex:inputfield>, labels aren't auto populated and styled and fields aren't laid out based upon the attributes set within the parent "pageblocksection" tag. Is there a way around this, or do they simply have to be styled?
  2. The label for the custom action seems to be the developer name for the page. Is there any way around this? I can't use spaces in my page name and like to categorise my visualforce page names in a way that wouldn't be very clear to other users.
  3. Using the <apex:outputlabel> value attribute with "{!$ObjectType.case.fields.<<FieldName>>.label}" sometimes outputs"common.api.soap.wsdl.Field@14f7af8d.label}" on the page instead of the field label

Is the documentation simply not completely accurate when it comes to how compatible visualforce pages are with the csae feed? If so, what resources should I look at to code these requirements? I'm not very expert in javascript, but can learn as need be, as long as I know where to look!

 

With thanks,

Andy

Best Answer chosen by Big Ears
Big EarsBig Ears
Bryn,

Thank you for your response. Apologies for not being clearer in my requirements here. The use case wasn't to auto-populate certain fields. Rather, it was to present a sub-set of fields from the case for the user to fill out in particular circumstances (i.e. when qualifying a new case, present the initial case set-up fields).

The main issue I was having was more around the presentation of these fields (bindings were acting up and field labels were being presented oddly), but I found a way around it through use of fieldsets. This also had the added benefit of reducing code admin (as fields can be added/removed from within the admin panel).

The second issue was a simple fix - I changed the page label to be something more human friendly, but kept the page name to my normal naming conventions

It's not perfect, as control over the presentation of field-sets is fairly minimal, and they come with their own idiosyncracies, but I largely worked around the issue.

All Answers

Bryn JonesBryn Jones
Andy,

You can automatically fill out standard SF feilds using a custom button along with "&cas#= value you want" in the link.
replace the "#" with the feild you want...see codes below(if the feild you want is missing play around with the numbers to get the right feild. I dont have the Case feilds on my page layout hence the missing numbers)

3 is Contact Name
4 is Account Name
7 is Status
11 is Case Origin
14 is Subject
15 is Description

Hope this makes sense and helps.
Bryn


Big EarsBig Ears
Bryn,

Thank you for your response. Apologies for not being clearer in my requirements here. The use case wasn't to auto-populate certain fields. Rather, it was to present a sub-set of fields from the case for the user to fill out in particular circumstances (i.e. when qualifying a new case, present the initial case set-up fields).

The main issue I was having was more around the presentation of these fields (bindings were acting up and field labels were being presented oddly), but I found a way around it through use of fieldsets. This also had the added benefit of reducing code admin (as fields can be added/removed from within the admin panel).

The second issue was a simple fix - I changed the page label to be something more human friendly, but kept the page name to my normal naming conventions

It's not perfect, as control over the presentation of field-sets is fairly minimal, and they come with their own idiosyncracies, but I largely worked around the issue.
This was selected as the best answer
JeeedeeeJeeedeee

Hi Bryn,
I am now also facing your problem nr3, that sometimes the label is rendered as "common.api.soap.wsdl.Field@14f7af8d.label". Did you get that one solved also using the fields sets?
Thanks, Jan-Dirk

JeeedeeeJeeedeee
Stupid, I now see my mistake... I forgot to include .Label . So for other developers having this label appear as common.api.soap.wsdl.Field@14f7af8d, have a good check to include .Label

{!$ObjectType.Case.Fields.CaseNumber.Label}