• Justin Tortorich
  • NEWBIE
  • 0 Points
  • Member since 2016
  • IT Administrator

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 1
    Replies
Please help. I've been trying to get this right for days with no luck.

I have a VF page with some rendered fields on it. The problem I'm having is when you click Save and if a validation rule throws an error, those rendered fields just disappear. I'm not sure what I need to do to keep them showing. Can someone help me out? See code and screenshots below.

Thanks,
Justin

FYI, I bolded the three fields that are rendered towards the bottom of my VF code.
<apex:page standardController="Opportunity" extensions="ShippingRequestController">
  <apex:form id="mainform" >
   <apex:pageMessages id="showmsg"></apex:pageMessages>
      <apex:outputPanel rendered="{!isSuccess}">
          <script>
              setTimeout(function(){ window.open('/{!oppid}','_self'); }, 1000);
          </script>
      </apex:outputPanel>
     <apex:sectionHeader subtitle="New Shipping Request" title="Shipping Request Edit"/>
       <apex:pageBlock mode="edit" title="Shipping Request Edit">
          <apex:pageBlockButtons >
            <apex:commandButton value="Save" action="{!customSave}" />
            <apex:commandButton action="{!cancel}" value="Cancel"/>
          </apex:pageBlockButtons>
          <apex:pageBlockSection columns="2" title="Information" id="blockA">
                  <apex:inputField value="{!shipReqObj.Name__c}" required="true" />
                  <apex:outputField value="{!shipReqObj.Request_Status__c}" />
                  <apex:inputField value="{!shipReqObj.Phone__c}" required="true"/>
                  <apex:inputField value="{!shipReqObj.Sales_Person__c }" />
                  <apex:inputField value="{!shipReqObj.Email__c}" />
                  <apex:outputField value="{!shipReqObj.Opportunity_Status__c}" />
                  <apex:inputField value="{!shipReqObj.Type_of_Address__c}" />
                  <apex:outputField value="{!shipReqObj.Opportunity__c}" />                    
                  <apex:inputField value="{!shipReqObj.Shipping_Address__c}" />
                  <apex:inputField value="{!shipReqObj.Comments_Customer_Preferences__c}"/> 
                  <apex:outputField value="{!shipReqObj.Account__c}" /> 
                  
           </apex:pageBlockSection>
           <apex:repeat value="{!lstWrapperShip}" var="prod">
                <apex:pageBlockSection columns="2" title="{!prod.productName +'  '+ prod.objShipReq.Description__c}" id="blockA">
                  <apex:outputLabel ></apex:outputLabel>
                  <apex:inputCheckbox value="{!prod.doNotShip}"  label="Skip"/>
                  <apex:outputField value="{!prod.objShipReq.Rau_Product__c}" />
                  <apex:inputField value="{!prod.objShipReq.Client_Receive_Date_Requested__c}" />
                  <apex:outputField value="{!prod.objShipReq.Description__c }" />
                  <apex:inputField value="{!prod.objShipReq.Client_Receive_Date_Unknown__c}" />
                  <apex:inputField value="{!prod.objShipReq.Asking_Price__c}" />
                  <apex:inputField value="{!prod.objShipReq.Item_Breakable__c}" />
                  <apex:inputField value="{!prod.objShipReq.Sales_Price__c }" />
                  <apex:inputField value="{!prod.objShipReq.Signature_Required__c }" />
                  <apex:inputField value="{!prod.objShipReq.Insured_Amount__c }" />
                  <apex:inputField value="{!prod.objShipReq.Send_Tracking_Email__c }" />
                  <apex:inputField value="{!prod.objShipReq.Location__c }" />
                  <apex:inputField value="{!prod.objShipReq.Inspected__c  }" />
                  <apex:outputLabel ></apex:outputLabel>
                  <apex:inputField value="{!prod.objShipReq.Repairs_Needed__c }" />
                  <apex:inputField value="{!prod.objShipReq.Comment__c}" />
                  <apex:inputField value="{!prod.objShipReq.Repair_Comments__c}" />
                  <apex:outputLabel ></apex:outputLabel>
                  <apex:outputLabel rendered="{!If(prod.objShipReq.Holiday_Shipping_Override__c == True, True, False)}" style="font-weight:800" value="*This item is eligible for free gift wrapping.*" />
                  <apex:outputLabel ></apex:outputLabel>
                  <apex:inputField rendered="{!If(prod.objShipReq.Holiday_Shipping_Override__c == True, True, False)}" value="{!prod.objShipReq.Gift_Wrapping__c}" />   
                  <apex:outputLabel ></apex:outputLabel>
                  <apex:inputField rendered="{!If(prod.objShipReq.Holiday_Shipping_Override__c == True, True, False)}" value="{!prod.objShipReq.Gift_Wrap_Note__c}" />
           </apex:pageBlockSection>
          </apex:repeat>
      </apex:pageBlock>   
    </apex:form>
</apex:page>

Screenshot before Save and Validation errors:
Before Save

Screenshot after Save and Validation errors exist:
After Save with errors
Hi All, question for you.

I'm a certified admin looking to hopefully become a certified developer. From looking at the course requirements, it looks like you must have at least two years experience with java and be somewhat proficient in the language.

This is where I'm at on a knowledge level...
I have been a certified admin for 3 years now. I consider myself a somewhat advanced admin. Extremely proficient with workflows, process builder, and flows. I can get by with making simple changes to VF pages, etc. I've deployed change sets, but have never been taught the best practices for making changes to an org (meaning: instead of making changes in Sandbox and then deploying the change set to Production, a lot of my changes are done directly in production.. would like knowledge on best practices for this). I am no java/apex language expert, but I can usually look at code and be able to at least tell you what it's doing...

Basically, I want to take the developer course that SF offers, but I don't want to get there and 10 minutes in be totally lost and regret paying for the course. If I'm overthinking it, please let me know. If there are other third party educational resources you can offer for what I'm looking for, please let me know. SF doesn't seem to offer an "Admin-to-Developer" type of course.

All feedback, advice is appreciated. Thanks.
-Justin
Go through the normal AppX installation from the challenge and it all looks good until the end where you get.....

Package Not Found
The requested package does not exist or has been deleted. Please contact the package publisher for assistance. If this is a recently uploaded package, please try again soon. 
Go through the normal AppX installation from the challenge and it all looks good until the end where you get.....

Package Not Found
The requested package does not exist or has been deleted. Please contact the package publisher for assistance. If this is a recently uploaded package, please try again soon.