• Sukesh Kumar 33
  • NEWBIE
  • 60 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 20
    Replies
Hello,

If i put rendered="{Qlist.Zone__c == 'Text' }"
<apex:outputPanel rendered="{Qlist.Zone__c == 'check' }">check present<br />
<apex:outputPanel rendered="{Qlist.Zone__c != 'check' }">check not present<br />

What happens if
1) Qlist is emplty or null
Hello,

When i create new entilement, the startDate is automatically populated to todays date, 
I want to fill it with a cutom date from the Quote, how can i achieve it ?

thanks for suggestions !
Hi, 

I need to have 2 elements inside an apex:facet. The requirement is to render one and not the other and to toggle.
 
<apex:column headerValue="Value">
                                    	<apex:outputField value="{!p.Value__c}" />
                                    	<apex:facet name="footer">
                                    	<apex:outputText styleClass="slds-input" value="{!staticValueField}" id="staticField"/>
                                    	<apex:inputText styleClass="slds-input" value="{!newParameterMapping.Value__c}" id="referenceField" onclick="setParamMappingType()" /></apex:facet>
                                	</apex:column>

But I'm not able to get it to work. No matter what just the second one will be rendered. Is there a way to do this? any workarround?

Thanks, 
Mario
Hi all,
I want to validate the custom check box before submitting Force.com sites custom vfpage. Can we use standard validation over here...? because i want to make the check box as mandetory. how can we achive this. Can anyone help me over here.

Thanks in advance.
regards,
Suneel.
Hi all,
I want to write trigger to insert data into Task from two custom objects. I have account lookup in two custom objects
Can I do this using Trigger?
Please share syntax if u have.

Thanks in Advance
I am trying to create a case record using a visual workflow that presents the user with only the required fields.  At the end, I'm trying to get the workflow to redirect the user the the created case.  I found this blog post which seems easy enough but it is failing.  Can someone help?

http://codefriar.com/2014/04/18/a-reusable-redirect-controller-for-visualflows/

My visualforce page is the following:  
 
<apex:page Controller="FlowRedirectController">
    <flow:interview name="RedirectFlow" interview="{!redirectTo}" finishLocation="{!finishLocation}" >
        <!-- This Parameter is *required!* -->
        <apex:param name="StartFlow" value="Data_Request_Flow" />
        <!-- 
        Any Params you need to pass into your flow.
        <apex:param name="CaseId" value="{!CaseId}"/> 
        -->
    </flow:interview>
</apex:page>

My Apex Class is the following: 
 
Public class FlowRedirectController{

   Public Flow.Interview.RedirectFlow redirectTo {get; set;}
    
   public FlowRedirectController() {
       Map<String, Object> forTestingPurposes = new Map<String, Object>();
       forTestingPurposes.put('vFinishLocation','codefriar.wordpress.com/');
       redirectTo = new Flow.Interview.RedirectFlow(forTestingPurposes);
   }

   Public PageReference getFinishLocation(){
       String finishLocation;
       if(redirectTo != null) {
           finishLocation = (string) redirectTo.getVariableValue('vFinishLocation');
       }
       PageReference send = new PageReference('/' + finishLocation);
       send.setRedirect(true);
       return send;
   }
}


My flow is called "Data_Request_Flow" and is Type=Flow.   

Whenever I navigate to the visualforce page, it errors out saying, "Interview not started 
An unexpected error has occurred. Your solution provider has been notified. (Flow)"
 
Hello,

If i put rendered="{Qlist.Zone__c == 'Text' }"
<apex:outputPanel rendered="{Qlist.Zone__c == 'check' }">check present<br />
<apex:outputPanel rendered="{Qlist.Zone__c != 'check' }">check not present<br />

What happens if
1) Qlist is emplty or null
Hi Team,

We have an requirement as mentioend below
1.When Phone # field is updated in Account , the same number has to get updated in Contact -> Phone # field and if the Phone # field in Contact is updated and the same Phone # has to be populated in Account -> Phone # field.

Through Trigger how we can acheive this,Can any one please Help me on this.

Thanks
Hi All,
I want to update task records using batch apex which are created today.
I want to update these details from custom object (Obj1__c). I have lookup to account in Obj1__c.
I want to update same account details in Task (I am already inserting data from another object using batch apex into Task)
What is syntax for this.
Please help me

Thanks in Advance
I am currently working on survey to display a random questions, For that i need to update random numbers to a sobject. But System.NullPointerException: occurred in my code.

Apex:
public class update_random_question 
{
public   List<Question__c> scope{get;set;}
public update_random_question()
{
    for(Question__c a : scope)
    {
        a.orderby__c = randomizer.getRandomNumber(100);            
    }
update scope;
} }

VF:​
<apex:page controller="update_random_question">
    <apex:form>
        <apex:commandButton Value="Begin" action="{!update_random_question}"/>
    </apex:form>
</apex:page>

Notes: randomizer.getRandomNumber
Please Help to fetch data  from following objects

customobject 1 related to contact and customobject 2

contact related to customobject1 and customobject 3

i wanted to get data from customobject1 ,customobject2 and customobject3 from contact 

Thanks
PLEASE HELP WITH FOLLOWING QUERY...
 i am trying to fetch data from contact to two related custom objects 
SELECT id,name FROM Contact where ID IN (SELECT Contact__c FROM custom object 1 WHERE NAME ='abc') AND (SELECT Contact__c FROM custom object 2 WHERE Name ='xyz')
Hi,

I need to show a list of those leads in my visualforce page on which any task or call is created. I have wrote the following query but it is not working.

Select Id, Name from Lead where Id IN (SELECT Who.Id FROM Task where Who.Type='Lead') limit 10

Can anyone help me?

Thanks,
Rohitash
HI,
On clicking a custom Tab, user should be redirected to one of the custom settings. The code is as below:
I want to make the URL as dynamic sothat i need to change the URL(https://ABC-INT.cs18.my.salesforce.com/). Please suggest.
public with sharing class ActivitiesController {
    public PageReference redirect() {
        return new PageReference('https://ABC-INT.cs18.my.salesforce.com/setup/ui/listCustomSettingsData.apexp?com.salesforce.visualforce.ViewStateCSRF=VmpFPSxNakF4TmkweE1TMHdORlF3T1Rvd05Eb3pOQzR5TkROYSxFbVV1SDVydmdzTXJnXzNWNXFTdjZhLE56RTNPVGcz&com.salesforce.visualforce.ViewStateVersion=201610312000010466&CS_Defn_View%3ACS_View=CS_Defn_View%3ACS_View&CS_Defn_View%3ACS_View%3AtheDetailBlock%3AdetailButtons%3Amanage=Manage&id=a1V&retURL=%2Fsetup%2Fui%2FviewCustomSettings.apexp%3Fsetupid%3DCustomSettings%26id%3D01I11000000AdEY');
    }
}
  • November 12, 2016
  • Like
  • 0
List has no rows for assignment
Everything works fine when I have values but if I have no values then this error occur while searching I came to know that I have to change object to list.If I change then this error occur 
Unknown property 'VisualforceArrayList.name' 
I give some part of my code
Visual force component:
// Visual force component

<apex:component controller="LongProjectOrderController" access="global" rendered="true">
  <apex:attribute description="lpo" name="lpo"  type="SalesOrder__c"/>
<table align="right">
<tr>
<td><b>Order No:</b></td>
<td>{!lpo.Name}</td>
</tr>
                           
<tr>
<td><b>Raised By:</b></td>
<td>{!lpo.CreatedBy.Name}</td>
</tr>
</table>

  <table>
 <tr>
<td><b>Summary of agreed Payment Schedule:</b></td>
<td><apex:outputText rendered="{!(ChildRecords.Room1_Payment_Include_In_Print__c == true)}" value="{!ChildRecords.PAYMENT_SCHEDULE_Room1__c}" /></td>
<td><apex:outputText rendered="{!(ChildRecords.Room2_Payment_Include_In_Print__c == true)}" value="{!ChildRecords.PAYMENT_SCHEDULE_Room2__c}" /></td>
</tr>
</table>

</apex:component>

controller
public with sharing class LongProjectOrderController {
public String MasterRecordId        {get; set;}
  
    public Project__c ChildRecords{get; set;}
   
    public LongProjectOrderController()
    {
     MasterRecordId =ApexPages.currentPage().getParameters().get('id');
   
      if(!String.isBlank(MasterRecordId)){
           
            
                 ChildRecords =
                [
                    SELECT Name,CreatedBy.Name,Room1_Payment_Include_In_Print__c,Room2_Payment_Include_In_Print__c
                       
                    FROM
                        Project__c
                    WHERE 
                        Long_Project_Order__c = :MasterRecordId
                ];
   
    }
}
}


 
Hello,

When i create new entilement, the startDate is automatically populated to todays date, 
I want to fill it with a cutom date from the Quote, how can i achieve it ?

thanks for suggestions !
Hi All,

Can anyone help me in building the JavaScript for refresh the page on click of Custom button in Edit page.
I have oppurtunity page in this I have craeted a new record and saved it and after the save, the page will goes to edit page.In the edit page I have Custom button to claculate the amount from 3rdparty application and I am getting the reference Id from 3rd party application on refresh of  browser or click of browser.But my requirement is not to refresh the page by myself it has to automatically refresh the page and get the Refrence ID from 3rd party application.

Intially I have achieved like this using Java script but the page is not refreshing or reloading,So can anyone help me on this issue.

Code:{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
var myJob = new sforce.SObject("Opportunity");
myJob.Id = "{!Opportunity.Id}";
myJob.check__c= "true";
var result = sforce.connection.update([myJob]);
setTimeout(window.location.reload(true),60000);
window.location.reload(true);
User-added image

Here is the EDIT page what iam trying to achieveUser-added image