• Steve Nelson
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi
Is it possible to create a visualforce page which allows the user to make changes to certain settings without going into the entire Setup screens?  There is a lot in Setup, and we only need the user to be able to enable Salesforce to Salesforce sharing and setup the connection and other setting for S2S.  We want to simplify things for the user to find and change these settings.

What are the Objects we would use in our Apex code to interact with these settings?

Thanks
Steve
Hello

Newbie here. I fear this is a bit basic, but I've been looking for answers for a couple of weeks with no luck. Hopefully this isn't too much to ask of the community.

​I have a custom object and a Visualforce page to edit the records. There is a Due Date field on the object of type Date.  When the record is edited, we need the date that is displayed in the input field to appear either in US format, or according to the user's locale.  We are fine with either. What we always get is yyyy-mm-dd. We want mm/dd/yyyy. Have read that Visualforce is supposed to respect a user's locale settings.

There are lots of posts around date formatting when you are using apex:outputText and apex:param tags when you are just viewing the data, but that doesn't work when you have an apex:inputField tag.

Here is the code:

<apex:page standardController="MyObject__c" docType="html-5.0" >
 <apex:form>
  <apex:outputPanel layout="block" >
   <apex:outputLabel value="Due Date" for="duedate"/>
   <apex:inputField type="date" showDatePicker="false" styleClass="slds-input" id="duedate" value="{!MyObject__c.Due_Date__c}"/>
  </apex:outputPanel>
 </apex:form>
</apex:page>

​​I have found a few approaches that deal with some custom controller code. But it doesn't seem like it should be that difficult or that much work. Is there some easy formatting option that I am missing? The code above is easy with the simple binding right to the object field. I did some experimenting trying to override the field in a controller extension to format a string using a getter. But I couldn't get that exactly right from the perspective of how to reference the controller extension's methods in the page, let alone what to do during a save operation. But if doing it in controller code is necessary, I'd appreciate some pointers in the right direction. I'm going through Trailhead and some other educational materials as I can, but in parallel have some development requests to address.

Thanks!
Steve​


Hello

Newbie here. I fear this is a bit basic, but I've been looking for answers for a couple of weeks with no luck. Hopefully this isn't too much to ask of the community.

​I have a custom object and a Visualforce page to edit the records. There is a Due Date field on the object of type Date.  When the record is edited, we need the date that is displayed in the input field to appear either in US format, or according to the user's locale.  We are fine with either. What we always get is yyyy-mm-dd. We want mm/dd/yyyy. Have read that Visualforce is supposed to respect a user's locale settings.

There are lots of posts around date formatting when you are using apex:outputText and apex:param tags when you are just viewing the data, but that doesn't work when you have an apex:inputField tag.

Here is the code:

<apex:page standardController="MyObject__c" docType="html-5.0" >
 <apex:form>
  <apex:outputPanel layout="block" >
   <apex:outputLabel value="Due Date" for="duedate"/>
   <apex:inputField type="date" showDatePicker="false" styleClass="slds-input" id="duedate" value="{!MyObject__c.Due_Date__c}"/>
  </apex:outputPanel>
 </apex:form>
</apex:page>

​​I have found a few approaches that deal with some custom controller code. But it doesn't seem like it should be that difficult or that much work. Is there some easy formatting option that I am missing? The code above is easy with the simple binding right to the object field. I did some experimenting trying to override the field in a controller extension to format a string using a getter. But I couldn't get that exactly right from the perspective of how to reference the controller extension's methods in the page, let alone what to do during a save operation. But if doing it in controller code is necessary, I'd appreciate some pointers in the right direction. I'm going through Trailhead and some other educational materials as I can, but in parallel have some development requests to address.

Thanks!
Steve​


Hi,

I'm using Lightning Design System with a Visualforce page and using <svg> tag to get SLDS Icons on Page header and Buttons. Initially on page load all works fine but when I try to re-render any <apex:outputPanel> that have <svg> icons inside it, on complete of rerendering it vanish my all <svg> icons.
I tried to debbug it by Inspect element in chrome and found after re-rendering any block my <svg> icon tags are not there.

anyone else experiencing this issue?

Any advise or guidance would be greatly appreciated.

Thanks,
@thatherahere