• Jaguar
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Can somebody pls help

 trigger trCheckReportStatus on After_Audit_Report__c (before insert) {
    for (After_Audit_Report__c aar : Trigger.new){
        List<After_Audit_Report__c> aar1 = [SELECT id, Property__c, Report_Date__c
                                 FROM After_Audit_Report__c
                                 WHERE Report_Date__c < :aar.Report_Date__c
            AND Report_Status__c = 'OPEN' and Property__c = :aar.Property__c];
           
            if (aar1.size() > 0){
                aar.addError('You have not closed Previous Day Report.  Please close the Previous Day before you can save this.');
            }
    }
}
I have a Custom Button 'New Vehicle' for a Custom Object which is a related list of Case.
This has a Javascript

window.open("/apex/CaseVehicles2?id="+{!Case.Id}  + ,'_blank','toolbar=no, scrollbars=yes, resizable=yes, top=300, left=300, width=1200, height=600, location=no, titlebar=no, menubar=no');

And for the life of me,  will not work and give me the error "identifier starts immediately after numeric literal".

Strangely enough, when I change merge field to a CaseNumber --  {!Case.CaseNumber}  it works fine.  But Case.id will not work

Am I missing something obvious ? 

Thanks



Any idea why the popup is not closing in the below code.  This is code for my Popuup Window from "New Vehicle" related
list of Case.  It opens fine, but I want it to close if I hit the cancel button or Save -- after saving the information.

Serial_Number__c is Required

When I hit "Close"  It says pls fill in the Required Fields.
Also When I hit "Save" it does not close.
Any idea Why ??
 


<apex:page standardController="Case_Vehicle__c" sidebar="false" >

        <script language="JavaScript" type="text/javascript">
        function closeAndRefresh()
        {
            window.close();
            window.opener.location.reload();
        }
        </script>

 


    <apex:form >
   
        <apex:pageBlock title="Case Vehicle"  mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save" oncomplete="closeAndRefresh()"/>
                <apex:commandButton value="cancel" onclick="closeAndRefresh()" />
              
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Vehicle Information" columns="2">
                <apex:inputField value="{!Case_Vehicle__c.Serial_Number__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.VIN__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Case__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Color__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Country__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Driver_Name__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Engine_Hours__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Fuel_Type__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Harness_Type__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.License_State__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.License_Plate__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.YMM__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Odometer__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Vehicle_Label__c}"/>
               
            </apex:pageBlockSection>
        </apex:pageBlock>
       
    </apex:form>
</apex:page>

 

  • April 15, 2014
  • Like
  • 0
Can somebody pls help

 trigger trCheckReportStatus on After_Audit_Report__c (before insert) {
    for (After_Audit_Report__c aar : Trigger.new){
        List<After_Audit_Report__c> aar1 = [SELECT id, Property__c, Report_Date__c
                                 FROM After_Audit_Report__c
                                 WHERE Report_Date__c < :aar.Report_Date__c
            AND Report_Status__c = 'OPEN' and Property__c = :aar.Property__c];
           
            if (aar1.size() > 0){
                aar.addError('You have not closed Previous Day Report.  Please close the Previous Day before you can save this.');
            }
    }
}
I have a Custom Button 'New Vehicle' for a Custom Object which is a related list of Case.
This has a Javascript

window.open("/apex/CaseVehicles2?id="+{!Case.Id}  + ,'_blank','toolbar=no, scrollbars=yes, resizable=yes, top=300, left=300, width=1200, height=600, location=no, titlebar=no, menubar=no');

And for the life of me,  will not work and give me the error "identifier starts immediately after numeric literal".

Strangely enough, when I change merge field to a CaseNumber --  {!Case.CaseNumber}  it works fine.  But Case.id will not work

Am I missing something obvious ? 

Thanks



Any idea why the popup is not closing in the below code.  This is code for my Popuup Window from "New Vehicle" related
list of Case.  It opens fine, but I want it to close if I hit the cancel button or Save -- after saving the information.

Serial_Number__c is Required

When I hit "Close"  It says pls fill in the Required Fields.
Also When I hit "Save" it does not close.
Any idea Why ??
 


<apex:page standardController="Case_Vehicle__c" sidebar="false" >

        <script language="JavaScript" type="text/javascript">
        function closeAndRefresh()
        {
            window.close();
            window.opener.location.reload();
        }
        </script>

 


    <apex:form >
   
        <apex:pageBlock title="Case Vehicle"  mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save" oncomplete="closeAndRefresh()"/>
                <apex:commandButton value="cancel" onclick="closeAndRefresh()" />
              
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Vehicle Information" columns="2">
                <apex:inputField value="{!Case_Vehicle__c.Serial_Number__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.VIN__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Case__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Color__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Country__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Driver_Name__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Engine_Hours__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Fuel_Type__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Harness_Type__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.License_State__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.License_Plate__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.YMM__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Odometer__c}"/>
                <apex:inputField value="{!Case_Vehicle__c.Vehicle_Label__c}"/>
               
            </apex:pageBlockSection>
        </apex:pageBlock>
       
    </apex:form>
</apex:page>

 

  • April 15, 2014
  • Like
  • 0

Hi,

 

I'm redirecting to new visualforce page in my class.

created URL look like.

https://xxx.visual.force.com/apex/NewPage?TestValue=value1&retURL=a0HS000000450UD

 

I'm trying to get TestValue into my Visualforce Page...

code of Page is here..

 

<apex:page standardController="XXX__c" extensions="EEE_Test">
    <apex:form >
        <apex:pageBlock >
        <apex:pageBlockSection columns="1">
             <apex:inputField value="{!CurrentPage.parameters.TestValue}"/>
    </apex:pageBlockSection>
        </apex:pageBlock>  
    </apex:form>
    </apex:page>

 

I'm getting "Save error: Field parameters does not exist. Check spelling."  during saving this page.

 

Please suggest how to get value from the URL in page InputField?