• ShamAhti
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi all, new to Apex and am stuck. I'm getting the error:

    Error: Compile Error: Variable does not exist: Disposition__c at line 354 column 23    

Here is the relevant part of the code:

@AuraEnabled
    public static Map<String, Object> createChildCase (Id parentCaseId, Id accountId, Id contactId, String inquiry, String disposition, String trending, String Market, String language, String origin) {

        // Check execution context; must be internal user
        if (!AccessControl.isInternalContext()) {
            throw new AccessControl.ContextException();  // Roll back the transaction
        }

        try {

            AccessControl.Model parentCase = AccessControl.encapsulate([
                SELECT CaseNumber
                FROM Case
                WHERE Id = :parentCaseId
            ]);

            // Create child case
            AccessControl.Model childCase = AccessControl.create(Case.getSObjectType());
            childCase.setField('ParentId', parentCaseId);
            childCase.setField('AccountId', accountId);
            childCase.setField('ContactId', contactId);
            childCase.setField('Inquiry_Type__c', inquiry);
            childCase.setField('Trending__c', trending);
            childCase.setField('Case_Language__c', language);
            childCase.setField('Origin', origin);
            childCase.dmlInsert();

            // Retrieve the case record
            Id i = (Id)childCase.getField('Id');
            childCase = AccessControl.encapsulate([
                SELECT CaseNumber, ParentId, AccountId, ContactId
                FROM Case
                WHERE Id = :i
            ]);
                
            childCase.Disposition__c = disposition;
            update childCase;

Disposition__c is a field in the case object and not a variable.
Hello Everyone,

I am trying to create 2 boxes that I can place Apex:Outputfield's inside to have Salesforce populate the To's and From's for my document.

User-added image
I need the page to RenderAs="PDF" so i am limited to the older css styling rather than the new SLDS styling

below is my code so far:
<apex:page standardController="Account" renderAs="pdf" >
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
            <style type="text/css">
                body {
                font-family: sans-serif;
                font-size:12px;
                }
            </style>      
        </head>    
        <body>   
            <table cellpadding="6" width="100%">
                <tr>
                    <td>
                        <apex:outputPanel >
                            <apex:image url="/servlet/servlet.FileDownload?file=0151D0000005bAO" width="150" Height="75"/>
                        </apex:outputPanel>
                    </td>
                    <td>
                        <apex:outputPanel >
                            Case Information
                        </apex:outputPanel>
                    </td>
                    <td>
                        <apex:outputPanel >
                            Form 2067
                        </apex:outputPanel>
                    </td>    
                </tr>
            </table>  
              <table cellpadding="6" width="70%">
                <tr>
                    <td>
                        <apex:outputPanel >
                            To:
                        </apex:outputPanel>
                    </td>
                    <td>
                        <apex:outputPanel >
                            From:
                        </apex:outputPanel>
                    </td>

                </tr>
            </table>           
            
            
        </body>
    </html>
</apex:page>

Any Ideas?