• Javeed Shaik
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 9
    Replies
Can you please name the top three new features in the recent Salesforce release (spring 17)?

Many Thanks,
Javeed Shaik
Hi,

I have a requiremnt as follows:
i. User provides some inputs in Visualforce Page 1 and Clicks "Save" and navigates to  Visualforce page 2.
ii. Using these inputs a visualforce page renderes as PDF
ii. In Visualforce page 2, a url field is populated with a url which takes the user to the Visualfoce page 3 which is rendered as PDF.

Req
Please let me know how I can acheive this requiremnt.

Thanks in Advance,
Javeed
 
How to open a case tab of a console app as a classic tab

Thanks in advance
 
I am unable to render outputPanel based on the picklist Value selection. Please let me know what is wrong with my code.
Thanks in advancve!!
 
<apex:page standardController="Case" extensions="PublisherController" showHeader="false">
<apex:form >
    <br/><br/><br/><br/>
    <table align="center" width="50%" cellpadding="5">
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Model</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Model__c}"/>
            </td>
            <td align="right" rowspan="2"><apex:outputText >Description</apex:outputText>
            </td>
            <td align="left" rowspan="2"><apex:inputField value="{!case.description}"/>
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Category</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Category__c}"/>
            </td>
            <td align="right">
            </td>
            <td align="center">
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Problem</apex:outputText>
            </td> 
            <td align="left">
                <apex:ActionRegion >
                    <apex:inputField value="{!case.Problem__c}"><apex:ActionSupport event="onchange" reRender="ddc"/></apex:inputField>
                </apex:ActionRegion>
            </td>
            <apex:outputPanel rendered="{!case.Problem__c=='Repair'}" id="ddc">
                <td align="right"><apex:outputText >Requested Day</apex:outputText>
                </td>
                <td align="left"><apex:inputField value="{!case.Requested_Date__c}"/>
                </td>
            </apex:outputPanel>
        </tr>
        <tr>
            <td align="right">
            </td> 
            <td align="right"><apex:commandButton value="Cancel" Model="{!Cancel}"/>
            </td>
            <td align="left"><apex:commandButton value="Create Case" Model="{!save}"/>
            </td>
            <td align="center">
            </td>
        </tr>
    </table>
</apex:form>
</apex:page>

 
I am unable to render outputPanel based on the picklist Value selection. Please let me know what is wrong with my code.
Thanks in advancve!!
 
<apex:page standardController="Case" extensions="PublisherController" showHeader="false">
<apex:form >
    <br/><br/><br/><br/>
    <table align="center" width="50%" cellpadding="5">
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Model</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Model__c}"/>
            </td>
            <td align="right" rowspan="2"><apex:outputText >Description</apex:outputText>
            </td>
            <td align="left" rowspan="2"><apex:inputField value="{!case.description}"/>
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Category</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Category__c}"/>
            </td>
            <td align="right">
            </td>
            <td align="center">
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Problem</apex:outputText>
            </td> 
            <td align="left">
                <apex:ModelRegion >
                    <apex:inputField value="{!case.Problem__c}"><apex:ModelSupport event="onchange" reRender="ddc"/></apex:inputField>
                </apex:ModelRegion>
            </td>
            <apex:outputPanel rendered="{!case.Problem__c=='Repair'}" id="ddc">
                <td align="right"><apex:outputText >Requested Day</apex:outputText>
                </td>
                <td align="left"><apex:inputField value="{!case.Requested_Date__c}"/>
                </td>
            </apex:outputPanel>
        </tr>
        <tr>
            <td align="right">
            </td> 
            <td align="right"><apex:commandButton value="Cancel" Model="{!Cancel}"/>
            </td>
            <td align="left"><apex:commandButton value="Create Case" Model="{!save}"/>
            </td>
            <td align="center">
            </td>
        </tr>
    </table>
</apex:form>
</apex:page>

 
Hi,

I was able to create the Visualforce page. I successfully enable the Visualforce page for Salesforce mobile apps and Lightning pages But unable to Create a Global Action using Custom Visualforce with the Visualforce page created above.

I even tried using this piece of code from salesforce documentation to check whether my vf page has any issues but I am getting the same error.
 
<apex:page docType="html-5.0" title="Create Account">
    
    <apex:remoteObjects >
        <apex:remoteObjectModel name="Account" fields="Id,Name"/>
    </apex:remoteObjects>
    
    <div class="mypage">
        Account Name:
        <input type="text" id="accountName"/>
        <button onclick="createAccount()">Create Account</button>
    </div>
    
    <script>
        function createAccount() {
            var accountName = document.getElementById("accountName").value;
            var account = new SObjectModel.Account();
            account.create({Name: accountName}, function(error, records) {
                if (error) {
                    alert(error.message);
                } else {
                   sforce.one.navigateToSObject(records[0]);
                }
            });
        }
    </script>
    
</apex:page>

Error:
GA error

Please let me know the issue.
Thanks in Advance!!
 
Hi

I created a visualforce page but I am unable to create new global action using this visualforce page.
I am not able to find what went wrong!! Please help me in this.

Thanks in advance!!

I am not able to create new global action using custom visualforce page
I am not able to figire out which workflow rule will update a field value if I have multiple workflow rules updating the same field.
Let us assume I have 3 workflow rules with 3 different criteria and all the wf rules updates the same field (x) if criteria meets.

If I have a scenario where all the criteria for 3 wf rules meet and 3 workflow rules triggers and try to update the same field(x).
What would be the result value of x? which wf will update this field?
I want to update 'Next Birthday' field to the same date of Next Year using a workflow field update whenever the 'Next Birthday' is Today.
I tried this using work flow field update, but it is not working . Please let me know whether it is possible or not?

Many Thanks,
Javeed Shaik
I wanted to display a case details as a table when user enters a case number and hit ''search" button.
I dont know what is wrong with my code. I also tried to display the searched element on browser console and log.. but its not working. Pleae help me out!!

My Controller:
global with sharing class CaseSearch {
    
    public string searchElement {get; set;}
    public static Case c;
    
    public CaseSearch(ApexPages.StandardController controller) {

    }
    
    @RemoteAction
    global static Case caseSearchMethod(string searchElement){
        c = [SELECT Id,Account.name,status FROM Case WHERE CaseNumber= :searchElement LIMIT 1];
        system.debug(searchElement);
        return c;
        }
}

and here is my Visualforce Page:
<apex:page standardController="Case" extensions="CaseSearch">
<apex:messages />
<style>
    input{
        float: center;
        width: 100%;
        padding: 12px  50px;
        margin: 8px 0;
        display: inline-block;
        border: 2px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
    .center{
        margin: auto;
        width: 60%;
        //border: 3px solid #73AD21;
        padding: 10px;
    }
    h{
        font-size: 20px; 
        text-align: center;
    }
    table {
        border: 1px solid;
        padding: 12px 20px;
    }
</style>
<script type="text/javascript"> 
    function search(){
    var searchElement = document.getElementById.('case_number').value;
        window.alert("Hello!");
        console.log(searchElement);
        Visualforce.remoting.manager.invokeAction("{!$remoteAction.CaseSearch.caseSearchMethod}",searchElement,function(result,event){
            if(event.status){
                console.log(searchElement);
            }
        });
    }
</script>
    <br/><br/><br/><br/>
    <div class="center">
        <input placeholder="Please Enter Your Case Number Here" id="case_number"></input>
        <Button type="button" value="Search" onclick="search()">Search</button>
    </div>
    <div id="caseDetails" class="center" rendered="false">
        <table style="width:100%">
            <tr>
                <th style="25%">Case Number</th>
                <th style="25%">Name</th>
                <th style="25%">Status</th>
            </tr>
            <tr>
                <td><apex:outputText value="{!C.CaseNumber}"></apex:outputText></td>
                <td><apex:outputText value="{!C.account.name}"></apex:outputText></td>
                <td><apex:outputText value="{!C.status}"></apex:outputText></td>
            </tr>
        </table>
    </div>

</apex:page>
*It would be nice if you help me to show the case details table only after I hit 'Search' button and align the search button to center.

Thanks in Advance!!
Javeed Shaik
Hi All,

I am not able to complete Apex Specialist Super Badge Chlallenge, getting this error "Challenge Not yet complete... here's what's wrong:  The Case object has not been renamed to 'Maintenance Request'." but I have already renamed the tab names because we cannot change the API name we can only change the lables.

Please help me in this.

Thanks in Advance,
Javeed Shaik

error
When I am trying to connect developer edition to validate challenge from trailhead module, after logging in I am taking to trailhead home page.
I am unable to render outputPanel based on the picklist Value selection. Please let me know what is wrong with my code.
Thanks in advancve!!
 
<apex:page standardController="Case" extensions="PublisherController" showHeader="false">
<apex:form >
    <br/><br/><br/><br/>
    <table align="center" width="50%" cellpadding="5">
        <tr>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Model</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Model__c}"/>
            </td>
            <td align="right" rowspan="2"><apex:outputText >Description</apex:outputText>
            </td>
            <td align="left" rowspan="2"><apex:inputField value="{!case.description}"/>
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Category</apex:outputText>
            </td> 
            <td align="left"><apex:inputField value="{!case.Category__c}"/>
            </td>
            <td align="right">
            </td>
            <td align="center">
            </td>
        </tr>
        <tr>
            <td align="right"><apex:outputText >Problem</apex:outputText>
            </td> 
            <td align="left">
                <apex:ActionRegion >
                    <apex:inputField value="{!case.Problem__c}"><apex:ActionSupport event="onchange" reRender="ddc"/></apex:inputField>
                </apex:ActionRegion>
            </td>
            <apex:outputPanel rendered="{!case.Problem__c=='Repair'}" id="ddc">
                <td align="right"><apex:outputText >Requested Day</apex:outputText>
                </td>
                <td align="left"><apex:inputField value="{!case.Requested_Date__c}"/>
                </td>
            </apex:outputPanel>
        </tr>
        <tr>
            <td align="right">
            </td> 
            <td align="right"><apex:commandButton value="Cancel" Model="{!Cancel}"/>
            </td>
            <td align="left"><apex:commandButton value="Create Case" Model="{!save}"/>
            </td>
            <td align="center">
            </td>
        </tr>
    </table>
</apex:form>
</apex:page>

 
Hi

I created a visualforce page but I am unable to create new global action using this visualforce page.
I am not able to find what went wrong!! Please help me in this.

Thanks in advance!!

I am not able to create new global action using custom visualforce page
I wanted to display a case details as a table when user enters a case number and hit ''search" button.
I dont know what is wrong with my code. I also tried to display the searched element on browser console and log.. but its not working. Pleae help me out!!

My Controller:
global with sharing class CaseSearch {
    
    public string searchElement {get; set;}
    public static Case c;
    
    public CaseSearch(ApexPages.StandardController controller) {

    }
    
    @RemoteAction
    global static Case caseSearchMethod(string searchElement){
        c = [SELECT Id,Account.name,status FROM Case WHERE CaseNumber= :searchElement LIMIT 1];
        system.debug(searchElement);
        return c;
        }
}

and here is my Visualforce Page:
<apex:page standardController="Case" extensions="CaseSearch">
<apex:messages />
<style>
    input{
        float: center;
        width: 100%;
        padding: 12px  50px;
        margin: 8px 0;
        display: inline-block;
        border: 2px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }
    .center{
        margin: auto;
        width: 60%;
        //border: 3px solid #73AD21;
        padding: 10px;
    }
    h{
        font-size: 20px; 
        text-align: center;
    }
    table {
        border: 1px solid;
        padding: 12px 20px;
    }
</style>
<script type="text/javascript"> 
    function search(){
    var searchElement = document.getElementById.('case_number').value;
        window.alert("Hello!");
        console.log(searchElement);
        Visualforce.remoting.manager.invokeAction("{!$remoteAction.CaseSearch.caseSearchMethod}",searchElement,function(result,event){
            if(event.status){
                console.log(searchElement);
            }
        });
    }
</script>
    <br/><br/><br/><br/>
    <div class="center">
        <input placeholder="Please Enter Your Case Number Here" id="case_number"></input>
        <Button type="button" value="Search" onclick="search()">Search</button>
    </div>
    <div id="caseDetails" class="center" rendered="false">
        <table style="width:100%">
            <tr>
                <th style="25%">Case Number</th>
                <th style="25%">Name</th>
                <th style="25%">Status</th>
            </tr>
            <tr>
                <td><apex:outputText value="{!C.CaseNumber}"></apex:outputText></td>
                <td><apex:outputText value="{!C.account.name}"></apex:outputText></td>
                <td><apex:outputText value="{!C.status}"></apex:outputText></td>
            </tr>
        </table>
    </div>

</apex:page>
*It would be nice if you help me to show the case details table only after I hit 'Search' button and align the search button to center.

Thanks in Advance!!
Javeed Shaik
Hi All,

I am not able to complete Apex Specialist Super Badge Chlallenge, getting this error "Challenge Not yet complete... here's what's wrong:  The Case object has not been renamed to 'Maintenance Request'." but I have already renamed the tab names because we cannot change the API name we can only change the lables.

Please help me in this.

Thanks in Advance,
Javeed Shaik

error
When I attempt to connect to my Developer Edition from a module, instead of connecting as usual I'm just returned to the Trailhead homepage and when I return to the model I'm still not connected....any ideas?
Hello, for the Salesforce Trailhead "Using Future Methods" I keep getting the error "The 'AccountProcessorTest' test class doesn't appear to be calling the 'AccountProcessor.countContacts' method between Test.startTest() and Test.stopTest()." I believe I have the right syntax, so I'm not sure what is wrong. My main class is fine. the problem only seems to be in the AccountProcessorTest.apxc

AccountProcessorTest.apxc
@isTest private class AccountProcessorTest {
    @isTest static void countContacts() {
        Test.setMock(AccountProcessorTest.class, new Account());
        Test.startTest();
        	AccountProcessor.countContacts();			
        Test.stopTest();
        
    } 	
}


Here is my main class in case anyone needs it:

AccountProcessor.apxc
global class AccountProcessor {
	@future
    public static void countContacts(Set<id> setId){
        List<Account> lstAccount = [SELECT Id, Number_of_Contacts__c, (SELECT Id FROM Contacts) FROM Account where id in : setid];
        for(Account acc: lstAccount){
            List<Contact> lstCont=acc.contacts;
            	acc.Number_of_Contacts__c = lstCont.size();
        }
        update lstAccount;
    }
}

Thank you in advance!
Justin Duross

 
My org has 10000 employees and I want to send email on their birthday. How to automate this process?