• Aravind R
  • NEWBIE
  • 70 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 9
    Replies
Hi,

I have a currency field on opportunity calles Currency1__c which can be any currency type(Multi-currency organization).

I want to compare this field with 700USD value
if(opptyrecord.Currency1__c > 700USD){

}

If Currency1__c is coming in INR, it should convert and compare with dollor value.

Please help in getting solution for this.

Thanks in advance
I have below code to redirect to diffrent page based on user's region, region is a custom field picklist:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 
{!REQUIRESCRIPT('/soap/ajax/29.0/apex.js')} 
var x = {!TEXT($User.Region__c)}; 
if(x == 'India'){ 
window.open("/apex/page1"); 

else{ 
window.open("/apex/page2"); 
}

But I am getting "India is not defined" error. Please help me out.

Thanks in advance
I have an object B which is a child of object A.

There are multiple record types for object B and I want to override new button on the related list of B on A object.I want to pre-select record type based on logged-in user's region. How can i achieve? Can I achieve with a custom button with javascript(Cannot afford apex class here)?

For eg., If user is from India, select record type-abc

Please suggest. Thnaks in advance.
I have a formula field "Solutions TAT" which is of 4500 compiled characters.

I have another formula field as below which is giving compiled formula is too big to execute error as I am referring "Solutions TAT" twice which is a big formula field:

IF( Solutions_TAT__c >  Target_Completion_Days_Solutions__c , 'RED'
 IF(Solutions_TAT__c < (Target_Completion_Days_Solutions__c * 0.7), 'GREEN',
'AMBER'

)

Please suggest some workaround to overcome this. Thanks in advance.
I have a twe date/time fields: Date1__c and Date2__c.

I need to calculate working days between two date/time field excluding weekends with fraction value.

Eg., Date1__c = '2015 - 07 - 08 13:00'
        Date2__c = '2015 - 07 - 10 15:00'
        difference: 2.08
Once the user saves the record, it must be saved as pdf and it should be mailed as an attachment to the record owner.
I have a pageblack and a commandlink inside that pagebloack..


<apex:pageBlock id="pag">
<apex:commandLink value="Click" action="{!removeInterest}" reRender="pag">
</apex:pageBlock>

But after clicking cammandlink, pageblock still showing old values, eventhough the values are correctly set
I have a apex pageblock which is:

<apex:pageBlock id="kl" rendered="{!isVisible}">
</apex:pageBlock>

<apex:commandButton value="OK" action="{!submitOK}" reRender="kl"/>


In function submitOK........ I made isVisible = false;

But still the pageblock is displaying.. Please helpout in this issue...
I have a Map called        Map<Integer,Wizard_Result__c> wizresults;

and my VF page is:

<apex:pageBlockTable value="{!wizresults}" var="wiz">
         <apex:column headerValue="Question">
           <apex:commandLink value="{!wizresults[wiz].Question__c}" action="{!submitQuesLink}" reRender="hiddenBlock">
           <apex:param assignTo="{!coun}" value="{!wiz}"/>
           </apex:commandLink>
</apex:column>
</apex:pageBlockTable>
       
But each time value of coun is returning 0.
I have an apex column as below

<apex:column value="on {!wrkf.Last_Updated_Date__c} by  {!wrkf.Last_Updated_By__c}" />

But I want to print when     !wrkf.Last_Updated_Date__c != null    otherwise I want tp print nothing. Please help me


eg1..      On 23/01/2014 by John
eg2       (Nothing to be printed)
I want to have latest values after clicking "Remove interest".. Code is working perfectly but I am able to see only after refreshing on my own

My vf page is:

<apex:page standardController="Aspirant__c" extensions="displayRelatedlists">
<apex:form >
<apex:pageBlock id="blk">
<apex:pageBlockTable value="{!prsns}" var="pr">
<apex:column value="{!pr.Name__c}" />
<apex:column >
<apex:facet name="header">Remove Interest</apex:facet>
<apex:commandLink value="Remove Interest" action="{!removeInterest}" reRender="blk" >
<apex:param assignTo="{!aspId}" name="aspId" value="{!pr.Id}" />
</apex:commandLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


apex class:

public class displayRelatedlists{
public ApexPages.StandardController controller{get;set;}
public Aspirant__c asps{get;set;}
public List<Interested_Persons__c> prsns{get;set;}
public String aspId{get;set;}
public displayRelatedlists(ApexPages.StandardController controller)
{
this.controller = controller;
this.asps= (Aspirant__c)controller.getRecord();
this.prsns = [SELECT Name__c from Interested_Persons__c where Interested_To__c=:asps.Id];
}
public PageReference removeInterest()
{
system.debug('++++++++++++++++++++ '+aspId);
Interested_Persons__c ipc = [select Id,Name__c from Interested_Persons__c where Id=:aspId];
delete ipc;
return null;
}

}
Once the user saves the record, it must be saved as pdf and it should be mailed as an attachment to the record owner.
Hi,

I have a currency field on opportunity calles Currency1__c which can be any currency type(Multi-currency organization).

I want to compare this field with 700USD value
if(opptyrecord.Currency1__c > 700USD){

}

If Currency1__c is coming in INR, it should convert and compare with dollor value.

Please help in getting solution for this.

Thanks in advance
Hi all,

There is one object let say Account. In Account I have 3 fields, Amount1, Amount2,Amount3. Now when I enter value in Amount1 at the time of creation of account record. Account2 field value get updated by (Amount1+10), that I am doing by before Insert event.

Now I want to update Amount3 field of same record let say by Amount2+40, so for this case I have to go by after insert event. I am doing the same by after insert event but it is throughing an error 'Feild is read only'. 
I have a twe date/time fields: Date1__c and Date2__c.

I need to calculate working days between two date/time field excluding weekends with fraction value.

Eg., Date1__c = '2015 - 07 - 08 13:00'
        Date2__c = '2015 - 07 - 10 15:00'
        difference: 2.08
Once the user saves the record, it must be saved as pdf and it should be mailed as an attachment to the record owner.
I have an apex column as below

<apex:column value="on {!wrkf.Last_Updated_Date__c} by  {!wrkf.Last_Updated_By__c}" />

But I want to print when     !wrkf.Last_Updated_Date__c != null    otherwise I want tp print nothing. Please help me


eg1..      On 23/01/2014 by John
eg2       (Nothing to be printed)
I want to have latest values after clicking "Remove interest".. Code is working perfectly but I am able to see only after refreshing on my own

My vf page is:

<apex:page standardController="Aspirant__c" extensions="displayRelatedlists">
<apex:form >
<apex:pageBlock id="blk">
<apex:pageBlockTable value="{!prsns}" var="pr">
<apex:column value="{!pr.Name__c}" />
<apex:column >
<apex:facet name="header">Remove Interest</apex:facet>
<apex:commandLink value="Remove Interest" action="{!removeInterest}" reRender="blk" >
<apex:param assignTo="{!aspId}" name="aspId" value="{!pr.Id}" />
</apex:commandLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


apex class:

public class displayRelatedlists{
public ApexPages.StandardController controller{get;set;}
public Aspirant__c asps{get;set;}
public List<Interested_Persons__c> prsns{get;set;}
public String aspId{get;set;}
public displayRelatedlists(ApexPages.StandardController controller)
{
this.controller = controller;
this.asps= (Aspirant__c)controller.getRecord();
this.prsns = [SELECT Name__c from Interested_Persons__c where Interested_To__c=:asps.Id];
}
public PageReference removeInterest()
{
system.debug('++++++++++++++++++++ '+aspId);
Interested_Persons__c ipc = [select Id,Name__c from Interested_Persons__c where Id=:aspId];
delete ipc;
return null;
}

}