• ThousifAli99
  • NEWBIE
  • 60 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 10
    Replies
Hi, I am trying to create a validation rule which I need to flag up an error message when the following occurs:

If field 1 = "Qualified" and field 2 "isnull" 

It is probably very basi but can anyone please assist?  Im used to SQL and not quite got the syntax.

Cheers,

Gareth
I have a pageBlockTable and I would like to display an image if certain criteria is met. I have tried every variation I can think of for this formula but the only result I get is showing the text result 'http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png' it doesn't actually show the image. The formula below shows an error - IMAGE can't but used in this formula.

Any suggestions? The full code is below:

{!IF(apt.Star_Image__c > 0,  IMAGE('http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png', "Image"), NULL)}    


<apex:pageBlock >
        <apex:pageBlockTable value="{!HOUDirectory}" id="HOUdir" var="apt" columnClasses="colcenter" headerClass="header" rowClasses="row" columnsWidth="200px,80px,60px,200px,200px,200px,150px">

            <apex:column style="vertical-align:top;text-align:left;font-family:trebuchet ms" headerValue="Complex Name">
                  {!apt.Complex_Name__c}              
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Phone">
                {!apt.Phone__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Year Built">
                {!apt.Year_Built__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Management">
                {!apt.Management_Company__r.Name}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Area">
                {!apt.Submarket__r.Name}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Commission">
                {!apt.Commission_Type__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="">
               {!IF(apt.Star_Image__c > 0,  IMAGE('http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png', "Image"), NULL)}
            </apex:column>
        </apex:pageBlockTable>
I have iframed a standard report in a visual force page as below 

<apex:page standardController="account" tabStyle="Account">
 <apex:iframe src="/00OK0000000dR7a?pv1={!Account.id}" scrolling="true" height="1588px" width="100%"/>
</apex:page>

The visual force page is embedded into Account detail page. When i open the detail page i get redirected to the standard report iframed in the page.
Does anybody know how to stop the auto redirect.
Hwy guys,  I created a visual force page for Opportunities which contains a custom button and when we press that button it should navigate to another visual force page.
Can anyone help me.

this is the initial VF page:

<apex:page standardController="Opportunity">
<apex:sectionHeader title="Edit Opportunity" subtitle="{!opportunity.name}"/>

<apex:form >
<apex:pageBlock title="Opportunity Edit" helpTitle="Opportunity" helpUrl="Opportunity">
<apex:pageBlockButtons >
<apex:commandButton value="Next" onclick="OpenPage('google'); return false;"/>
When we press the next button it should navigate to another visual force page



</apex:pageBlockButtons>
<apex:pageBlockSection title="Opportunity Information" collapsible="false" >

<apex:outputText value="{!Opportunity.Owner}" 
label="Opportunity Owner"/>

<apex:inputField value="{!Opportunity.Amount}"
label="Amount"/>

<apex:inputCheckbox value="{!Opportunity.IsPrivate}"
label="Private"/>

<apex:inputField value="{!Opportunity.CloseDate}" required="true"
label="CloseDate"/>

<apex:inputField value="{!Opportunity.Name}" required="true"
label="Opportunity Name"/>

<apex:inputText value="{!Opportunity.NextStep}"
label="NextStep"/>
<apex:inputText value="{!Opportunity.Account}" 
label="Account Name"/>

<apex:inputfield value="{!Opportunity.StageName}" 
                 required="true" 
                 id="stage" 
                 onclick="changeblock();"/>
<apex:inputField value="{!Opportunity.Type}"
label="Type"/> 
<apex:inputField value="{!Opportunity.LeadSource}"
label="LeadSource"/> 

<apex:inputText value="{!Opportunity.Campaign}"
label="Primary Campaign Source"/>

<apex:inputText value="{!Opportunity.Rating__c}"
label="Rating"/>
</apex:pageBlockSection>
</apex:pageBlock>

</apex:form>
</Apex:page>
 
Hi, I am trying to create a validation rule which I need to flag up an error message when the following occurs:

If field 1 = "Qualified" and field 2 "isnull" 

It is probably very basi but can anyone please assist?  Im used to SQL and not quite got the syntax.

Cheers,

Gareth
Hello all,

I have been working on writing an apex trigger to update an account date field when a task that meets certain criteria is entered.  The code works great when you have a whatID.  The problem though is when you use email to salesforce, the emails are only attached to the whoID and leaves the whatID null.  I need to find a way to modify my code to look at the whoID and determine what account it is associated with and then update that account.  I need some help.  Take a look and let me know your thoughts.  Thanks.

trigger updateAccountEngagement on Task (before insert, before update) {
    
    List<Id> accountIds=new List<Id>();
    for(Task t:trigger.new){
        if(t.Status=='Completed'){
            if(t.whatId != null && (String.valueOf(t.whatId).startsWith('001')==TRUE || String.valueOf(t.whatId).startsWith('006')==TRUE) && (String.valueOf(t.subject).startsWith('Email: Re:')==TRUE || String.valueOf(t.subject).startsWith('Email: Fw:')==TRUE || t.Engagement__c==TRUE)){//check if the task is associated with an account
                accountIds.add(t.whatId);
            }//if 2
        }//if 1
    }//for
    List<Account> accountsToUpdate=[SELECT Id, Last_Engagement_Date__c FROM Account WHERE Id IN :accountIds];
    For (account a:accountsToUpdate){
        a.Last_Engagement_Date__c=date.today();
    }//for
    
    try{
        update accountsToUpdate;
    }catch(DMLException e){
        system.debug('Accounts were not all properly updated.  Error: '+e);
    }
}//trigger
I have a pageBlockTable and I would like to display an image if certain criteria is met. I have tried every variation I can think of for this formula but the only result I get is showing the text result 'http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png' it doesn't actually show the image. The formula below shows an error - IMAGE can't but used in this formula.

Any suggestions? The full code is below:

{!IF(apt.Star_Image__c > 0,  IMAGE('http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png', "Image"), NULL)}    


<apex:pageBlock >
        <apex:pageBlockTable value="{!HOUDirectory}" id="HOUdir" var="apt" columnClasses="colcenter" headerClass="header" rowClasses="row" columnsWidth="200px,80px,60px,200px,200px,200px,150px">

            <apex:column style="vertical-align:top;text-align:left;font-family:trebuchet ms" headerValue="Complex Name">
                  {!apt.Complex_Name__c}              
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Phone">
                {!apt.Phone__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Year Built">
                {!apt.Year_Built__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Management">
                {!apt.Management_Company__r.Name}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Area">
                {!apt.Submarket__r.Name}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="Commission">
                {!apt.Commission_Type__c}
            </apex:column>
            <apex:column style="vertical-align: top;font-family:trebuchet ms" headerValue="">
               {!IF(apt.Star_Image__c > 0,  IMAGE('http://www.locatormls.com/staticfiles/misc/{!apt.Star_Image__c}star.png', "Image"), NULL)}
            </apex:column>
        </apex:pageBlockTable>
Hi there,

I have an Apex Rest Webservice that I need to call but without oAuth. I want to use my username and password to authenticate. Is this possible? If yes, how can I do this? Assume that I will be calling this from either Java or C#. Thanks.

SS.

 
I have iframed a standard report in a visual force page as below 

<apex:page standardController="account" tabStyle="Account">
 <apex:iframe src="/00OK0000000dR7a?pv1={!Account.id}" scrolling="true" height="1588px" width="100%"/>
</apex:page>

The visual force page is embedded into Account detail page. When i open the detail page i get redirected to the standard report iframed in the page.
Does anybody know how to stop the auto redirect.