• Christophe Lucchini
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 15
    Replies
Hi Everyone !

We want to make a validation rule on the Object "Opportunity", the rule is basically:

We want to check the profile of the user editing the opportunity :
If the profile is Sales User/CSE/Technician/Project manager user/Sales & services
And the stage of the opportunity he want to put is :
Verbal / Contract / Launched / Invoiced / Closed

So if all this is gathered, an error message is displayed:"You can't change the stage with this profile."

Here is the formula i put on the validation rule :
AND( 
$Profile.Name = "Sales User", 
$Profile.Name = "CSE", 
$Profile.Name = "Technician", 
$Profile.Name = "Project Manager User", 
$Profile.Name = "Sales & Service", 
ISCHANGED(StageName), 
OR( 
text(StageName) = "Contract", 
text(StageName) = "Launched", 
text(StageName) = "Invoiced", 
text(StageName) = "Verbal", 
text(StageName) = "Closed" ))
And no error message when i try this from the profile i list and the stage i list too, please someone can help ?

Thanks !




 
Hi Everyone !

I want to make a validation rule on the object "Opportunity", the rule is basically :

We want to check the Stage of the opportunity , if the opp is in stage = Negotiation / Verbal / Contract / Launched / Invoiced / Closed , and the field "agent" (Sales_Agent__c) is different from "None (Sales Agent)" and the field "Agent_Commission__c" is blank and the field "Agent_Commission_Amount_Manual__c" is blank.

So if all this is gathered, an error message is displayed:"Please check the agent commissions. ..."

So in order to do that , i have created a validation rule , like this:

AND(
OR(
text(StageName) = "Negotiation",
text(StageName) = "Verbal",
text(StageName) = "Contract",
text(StageName) = "Launched",
text(StageName) = "Invoiced",
text(StageName) = "Closed",
OR(
ISBLANK( Agent_Commission__c )
,
Sales_Agent__c<>"None (Sales Agent)"
,
ISBLANK(Agent_Commission_Amount_Manual__c)))

But i have an issue , when we apply the validation rule , even if the field "Agent" is equal to "None (Sales Agent)" the rule still applies.

Thanks for your help !
Hi Guys,

I have this code part:

IF( ISBLANK(Credit_Score_by_Exception__c),

IF(Pellenc_credit_score_FA__c =="1"  ,"50% downpayment for order confirmation payable at 5 days net, 50% for production completion payable at 5 days net",
IF(Pellenc_credit_score_FA__c =="2", "40% downpayment for order confirmation payable at 5 days net, 30 % for production completion payable at 5 days net, 20% for shipping payable at 30 days net, 10% for start-up payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="3", "30% downpayment for order confirmation payable at 5 days net, 30% for production completion payable at 5 days net, 20 % for shipping payable at 30 days net, 10%, for start-up payable at 30 days net, 10% for final reception payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="4", "30% downpayment for order confirmation payable at 5 days net, 10% for shipping payable at 30 days net, 30% for delivery payable at 30 days net, 20% for commissioning payable at 30 days net, 10% for final reception payable at 30 days net ", IF(Pellenc_credit_score_FA__c =="5", "20% Downpayment for order confirmation payable at 5 days net, 30 % for delivery payable at 30 days net, 40% for commissioning payable at 30 days net, 10 % for final reception payable at 30 days net", "NULL" ))))))

And its keep telling me "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2"

Can you please help me ?

Thanks !
Hi everyone,

I'm trying to create my first mail Template visualforce page , and in this page i have to put a related list associated on the Objects "contracts" , the relate list is called "Machines under Warranty" (ass you can see in pic):
User-added image

The primary objective is to create an email template wich contain the Machine in Warranty according to the actual contract of the client.

Here is my visualforce templace (sorry if its really bad because i don't have the time to train on this and i have an urgent asking from my Customer service):

<messaging:emailTemplate subject="PellencST Warranty test" recipientType="Contact" relatedToType="Contract">
<messaging:htmlEmailBody > 
<html>
 
        <body>
 
        <STYLE type="text/css">
 
            TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
 
            TD  {font-size: 11px; font-face: verdana }
 
            TABLE {border: solid #CCCCCC; border-width: 1}
 
            TR {border: solid #CCCCCC; border-width: 1}
 
         </STYLE>
      <font face="arial" size="2">
     
<p>Bonjour,</p>
<p>Nous vous informons que la garantie de vos trieurs optique PellencST arrive à échéance.</p>
 
<p>En effet votre contrat de garantie a débuté le {!relatedTo.StartDate} et se termine le {!relatedTo.EndDate} pour les machines suivantes:</p>
 
 
 
<p>Vous trouverez ci-dessous un tableau récapitulatif des différentes options de contrats de services auxquelles vous pouvez souscrire afin de garder un service adapté pour un fonctionnement optimum de vos équipements:</p>
 
<table border="0" >
    <tr >
        <th>Machine Name</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Machine__c}">
        <tr>
            <td>{!cx.Machine_Name__c}</td>
        </tr>
    </apex:repeat>                
</table>
<p />
 
<p>Désormais votre dossier est suivi par notre Service Client ainsi pour tous conseils dans ces démarches vous pouvez contacter notre service au 04.90.09.47.94 ou par mail au sav@pellenct.com.</p>
 
 
<p>Le service client PellencST</p>
 
<p>sav@pellencst.com</p>
<p>+334 90 09 47 94</p>
<p>PELLENC ST</p>
 
<p>Pellenc ST | 125, rue François Gernelle | 84120 Pertuis | France | pellencst.com | +33 4 90 09 47 94</p>
 
 
<p>This email transmission is confidential and intended solely for the person or organization to who it is addressed. If you are not the intended recipient, you must not take any action in reliance of it.</p>
<p>Ce message et les pièces jointes sont confidentiels et établis à l’intention exclusive de ses destinataires. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse.</p>
            </font>
        </body>
    </html>
</messaging:htmlEmailBody > 
 
</messaging:emailTemplate>

The thing is i got a problem with this part i think:

<table border="0" >
    <tr >
        <th>Machine Name</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Machine__c}">
        <tr>
            <td>{!cx.Machine_Name__c}</td>
        </tr>
    </apex:repeat>                
</table>
<p />

Salesforce keep repeating me "Error: Unknown property 'String.Machine_Name__c'

Can someone help me with this, or maybe with the full template as i think, i have made many mistake.

Thanks !!
Hi Everyone !

We want to make a validation rule on the Object "Opportunity", the rule is basically:

We want to check the profile of the user editing the opportunity :
If the profile is Sales User/CSE/Technician/Project manager user/Sales & services
And the stage of the opportunity he want to put is :
Verbal / Contract / Launched / Invoiced / Closed

So if all this is gathered, an error message is displayed:"You can't change the stage with this profile."

Here is the formula i put on the validation rule :
AND( 
$Profile.Name = "Sales User", 
$Profile.Name = "CSE", 
$Profile.Name = "Technician", 
$Profile.Name = "Project Manager User", 
$Profile.Name = "Sales & Service", 
ISCHANGED(StageName), 
OR( 
text(StageName) = "Contract", 
text(StageName) = "Launched", 
text(StageName) = "Invoiced", 
text(StageName) = "Verbal", 
text(StageName) = "Closed" ))
And no error message when i try this from the profile i list and the stage i list too, please someone can help ?

Thanks !




 
Hi Everyone !

I want to make a validation rule on the object "Opportunity", the rule is basically :

We want to check the Stage of the opportunity , if the opp is in stage = Negotiation / Verbal / Contract / Launched / Invoiced / Closed , and the field "agent" (Sales_Agent__c) is different from "None (Sales Agent)" and the field "Agent_Commission__c" is blank and the field "Agent_Commission_Amount_Manual__c" is blank.

So if all this is gathered, an error message is displayed:"Please check the agent commissions. ..."

So in order to do that , i have created a validation rule , like this:

AND(
OR(
text(StageName) = "Negotiation",
text(StageName) = "Verbal",
text(StageName) = "Contract",
text(StageName) = "Launched",
text(StageName) = "Invoiced",
text(StageName) = "Closed",
OR(
ISBLANK( Agent_Commission__c )
,
Sales_Agent__c<>"None (Sales Agent)"
,
ISBLANK(Agent_Commission_Amount_Manual__c)))

But i have an issue , when we apply the validation rule , even if the field "Agent" is equal to "None (Sales Agent)" the rule still applies.

Thanks for your help !
Hi Guys,

I have this code part:

IF( ISBLANK(Credit_Score_by_Exception__c),

IF(Pellenc_credit_score_FA__c =="1"  ,"50% downpayment for order confirmation payable at 5 days net, 50% for production completion payable at 5 days net",
IF(Pellenc_credit_score_FA__c =="2", "40% downpayment for order confirmation payable at 5 days net, 30 % for production completion payable at 5 days net, 20% for shipping payable at 30 days net, 10% for start-up payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="3", "30% downpayment for order confirmation payable at 5 days net, 30% for production completion payable at 5 days net, 20 % for shipping payable at 30 days net, 10%, for start-up payable at 30 days net, 10% for final reception payable at 30 days net",
IF(Pellenc_credit_score_FA__c =="4", "30% downpayment for order confirmation payable at 5 days net, 10% for shipping payable at 30 days net, 30% for delivery payable at 30 days net, 20% for commissioning payable at 30 days net, 10% for final reception payable at 30 days net ", IF(Pellenc_credit_score_FA__c =="5", "20% Downpayment for order confirmation payable at 5 days net, 30 % for delivery payable at 30 days net, 40% for commissioning payable at 30 days net, 10 % for final reception payable at 30 days net", "NULL" ))))))

And its keep telling me "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2"

Can you please help me ?

Thanks !
Hi everyone,

I'm trying to create my first mail Template visualforce page , and in this page i have to put a related list associated on the Objects "contracts" , the relate list is called "Machines under Warranty" (ass you can see in pic):
User-added image

The primary objective is to create an email template wich contain the Machine in Warranty according to the actual contract of the client.

Here is my visualforce templace (sorry if its really bad because i don't have the time to train on this and i have an urgent asking from my Customer service):

<messaging:emailTemplate subject="PellencST Warranty test" recipientType="Contact" relatedToType="Contract">
<messaging:htmlEmailBody > 
<html>
 
        <body>
 
        <STYLE type="text/css">
 
            TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }
 
            TD  {font-size: 11px; font-face: verdana }
 
            TABLE {border: solid #CCCCCC; border-width: 1}
 
            TR {border: solid #CCCCCC; border-width: 1}
 
         </STYLE>
      <font face="arial" size="2">
     
<p>Bonjour,</p>
<p>Nous vous informons que la garantie de vos trieurs optique PellencST arrive à échéance.</p>
 
<p>En effet votre contrat de garantie a débuté le {!relatedTo.StartDate} et se termine le {!relatedTo.EndDate} pour les machines suivantes:</p>
 
 
 
<p>Vous trouverez ci-dessous un tableau récapitulatif des différentes options de contrats de services auxquelles vous pouvez souscrire afin de garder un service adapté pour un fonctionnement optimum de vos équipements:</p>
 
<table border="0" >
    <tr >
        <th>Machine Name</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Machine__c}">
        <tr>
            <td>{!cx.Machine_Name__c}</td>
        </tr>
    </apex:repeat>                
</table>
<p />
 
<p>Désormais votre dossier est suivi par notre Service Client ainsi pour tous conseils dans ces démarches vous pouvez contacter notre service au 04.90.09.47.94 ou par mail au sav@pellenct.com.</p>
 
 
<p>Le service client PellencST</p>
 
<p>sav@pellencst.com</p>
<p>+334 90 09 47 94</p>
<p>PELLENC ST</p>
 
<p>Pellenc ST | 125, rue François Gernelle | 84120 Pertuis | France | pellencst.com | +33 4 90 09 47 94</p>
 
 
<p>This email transmission is confidential and intended solely for the person or organization to who it is addressed. If you are not the intended recipient, you must not take any action in reliance of it.</p>
<p>Ce message et les pièces jointes sont confidentiels et établis à l’intention exclusive de ses destinataires. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse.</p>
            </font>
        </body>
    </html>
</messaging:htmlEmailBody > 
 
</messaging:emailTemplate>

The thing is i got a problem with this part i think:

<table border="0" >
    <tr >
        <th>Machine Name</th>
    </tr>
    <apex:repeat var="cx" value="{!relatedTo.Machine__c}">
        <tr>
            <td>{!cx.Machine_Name__c}</td>
        </tr>
    </apex:repeat>                
</table>
<p />

Salesforce keep repeating me "Error: Unknown property 'String.Machine_Name__c'

Can someone help me with this, or maybe with the full template as i think, i have made many mistake.

Thanks !!