• AAI
  • NEWBIE
  • 90 Points
  • Member since 2015


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

I am tying to download attachments from child cases using Salesforce inspector.

Is it possible?.
Thanks
  • November 02, 2018
  • Like
  • 0
Hi,

I need to create a formula to populate the value from a field A to field B when field A value is null.
I am trying with this formula in the report:

IF(
ISBLANK (field A) , NULL,
field A = field B)
The fields are numbers
Any help wou be great.

Thanks,
Amaya
  • March 01, 2018
  • Like
  • 0

hi everyone,

I have an issue with an email alert through a workflow. The workflow is activated when an opportunity is created. After that, the email alert should work. however, the recipients don´t receive any alert. This fact happens when an internet internal network is used. I mean, if I follow the same steps using other internet network outside this company, the workflow works. 

All the configuration requeriments about email deliverability are on:

Does anyone have any idea?, I would appreciate any help:

Many thanks;

 

  • February 26, 2018
  • Like
  • 0
Hi all,

I am trying to install an unmanaged package and I get the following error:

Required fields are missing: [TableEnumOrId, TriggerType]

Any help?.

Thanks in advance,
Amaya
  • February 07, 2018
  • Like
  • 0
I create the folllowing validation rule. I would need that the subject field is not blank when the mail received and mail sent are selected.
Any idea why doesn´t work?

Thanks in advance.

IF(
   AND (
        ISBLANK (Subject),

         OR(
           ISPICKVAL( Type ,"Mail received" ),

               ISPICKVAL ( Type ,"Mail sent" ))), true, false)
  • December 04, 2017
  • Like
  • 0
Hi all,

I need to limit this validation rule to 2 profiles. I mean, this profiles won´t be able to modify the fields.

I attach the rule and I would appreciate any help`.

AND ( 

OR ($Profile.Name ="Manager Comercial-VGARC", $Profile.Name ="Manager Comercial"), 

NOT(ISNEW()),OR (ISCHANGED( Canal__c ),(ISCHANGED( LeadSource )) 

))
  • August 30, 2017
  • Like
  • 0
Hi all,

I need that the following fields can´t be modified if they have a value and be new records. do you have any idea why this validation rule doesn´t work?. Thanks

AND ( OR (ISCHANGED( Canal__c )), 

         OR (ISCHANGED( CampanyaActual__c )),
       
            OR (ISCHANGED( LeadSource ))

)
  • July 04, 2017
  • Like
  • 0
Hi all,

I created this formula to get a divisa number. The question is that I can´t use the operator " * " to calculate the figure. I would appreciate any idea?

IF ( BillingDate__c + Service_Term_months__c * 30 > DATE(YEAR(TODAY())+1,1,1),
 
    IF ((NRC__c +  Incremental_MRC__c )* DATE(YEAR(TODAY())+1,1,1) -  BillingDate__c),

         IF ( BillingDate__c + Service_Term_months__c * 30 < DATE(YEAR(TODAY())+1,1,1)),

             IF(NRC__c +  (Incremental_MRC__c * Service_Term_months__c),null)
             

Thanks,
  • April 25, 2017
  • Like
  • 0
Hi all,
I would need to create an Apex class for the following trigger. I would apprecite any help. I am newbie. Thanks in advance.

trigger Unqualified on Lead (before update ) {
System.debug ('**entro en el trigger before update'); // es un comentario para verlo en el log//

List<Lead> Leads = New List <Lead>();// guarda la información de los leads. Declara e inicializa. List (nombre del objeto) //
List<Id> Ids = New List <Id>();
for (Lead l: Trigger.new){
    Ids.add (l.Id);
}
//Se obtienen los Id de los procesos de aprobación y de los Leads//
List<ProcessInstance> instances = [select Id, TargetObjectId from ProcessInstance where TargetObjectId in :Ids];
Map<Id,Id> LeadProcessMap = new Map<Id,Id>();
Ids = New List <Id>();
for(ProcessInstance pi:instances){
        LeadProcessMap.put (pi.TargetObjectId,pi.Id); 
        Ids.add (pi.Id);// se guardan los Ids de los process instances para que los coja la segunda query//
    }//Con el for se pobla el mapa compuesto por el Id del Lead y del Process Instance//
System.Debug ('** mapa1: '+LeadProcessMap);
    
List<ProcessInstanceStep> instancesSteps = [select Comments,ProcessInstanceId from ProcessInstanceStep where ProcessInstanceId in :Ids];
Map<Id,String> LeadProcessStepMap = new Map<Id,String>(); // String porque hace referencia a comentarios//
for(ProcessInstanceStep pis:instancesSteps){
        LeadProcessStepMap.put (pis.ProcessInstanceId, pis.Comments); 
    }//Con el for se pobla el mapa compuesto por el Id del Lead y del Process Instance//

System.Debug ('** mapa2: '+LeadProcessStepMap);

 //recorre todos los leads//   
for (Lead l: Trigger.new){
    if (l.recordtypeId == '0120Y000000Pquz' && l.status == 'Unqualified' && LeadProcessStepMap.get(LeadProcessMap.get(l.Id))!= null){
        
        System.debug ('** razon2: '+LeadProcessStepMap.get(LeadProcessMap.get(l.Id)));
            l.ReasonRejectedByCommercialPlanning__c = LeadProcessStepMap.get(LeadProcessMap.get(l.Id));
        System.debug ('** razon: '+l.ReasonRejectedByCommercialPlanning__c);
        }


       
}
  • March 21, 2017
  • Like
  • 0
Hi all,

I would need to validate differents options. If Lead Status is "Unqualified", Reason rejected must be filled but if lead status is open or pending or
qualified, the reason rejected must not be filled. Here is my code. Any help?
AND( 
ISPICKVAL(Status ,"Unqualified"), 
ISBLANK( ReasonRejectedByCommercialPlanning__c ))
OR
ISPICKVAL(Status ,"Open")
NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))
||
ISPICKVAL(Status ,"Pending")
NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))

Many thanks
  • March 02, 2017
  • Like
  • 0
Hi ,

I would need a button with 3 conditions. However, the phone condition doesn´t work. Any idea?. Thanks in advance
 
{!REQUIRESCRIPT("/soap/ajax/38.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/38.0/apex.js")}


var status = "{!Lead.Status}";
var Cartera__c = "{!Lead.Cartera__c}";
var Phone = "{!Lead.Phone}";
if (status == "Open" || status == "Assigned"){
if(Cartera__c!= null && Cartera__c!=""){
if(Phone != null && Phone !=""){
var lead = new sforce.SObject('Lead');
lead.id = "{!Lead.Id}";
lead.Status = "Pending conversion";
result = sforce.connection.update([lead]);
location.reload(true);
}
}else{
alert('Cartera Cannot be null');
}
}else{
alert("Invalid status. You can only submit to conversion the Lead if the status is Open or Assigned");
}
  • March 01, 2017
  • Like
  • 0
Hi all,

I would need a button with 3 conditions. However, the phone condition doesn´t work. Any idea?. Thanks in advance
 
{!REQUIRESCRIPT("/soap/ajax/38.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/38.0/apex.js")}


var status = "{!Lead.Status}";
var Cartera__c = "{!Lead.Cartera__c}";
var Phone = "{!Lead.Phone}";
if (status == "Open" || status == "Assigned"){
if(Cartera__c!= null && Cartera__c!=""){
if(Phone != null && Phone !=""){
var lead = new sforce.SObject('Lead');
lead.id = "{!Lead.Id}";
lead.Status = "Pending conversion";
result = sforce.connection.update([lead]);
location.reload(true);
}
}else{
alert('Cartera Cannot be null');
}
}else{
alert("Invalid status. You can only submit to conversion the Lead if the status is Open or Assigned");
}
  • February 28, 2017
  • Like
  • 0
Hi all,

I would need that if a user select a piclist field value, another text field can´t be blank.

Here is my code. Any help, please?

AND (
ISPICKVAL( Status  , "Unqualified"),
 NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))

 )
  • February 10, 2017
  • Like
  • 1
This rule works however, if the user chooses other value in the Stage name and chooses a required value for Product Support, this value doesn´t save. Any idea??. Thanks. Note: both field are picklist

IF(

 ISPICKVAL( StageName , "5 - Qualification"),

 ISPICKVAL( Product_Support__c, "None"),true)
  • February 10, 2017
  • Like
  • 1
Hi all,

I created a custom label named "Proposal validation" instead of "Star Sync" button. I used the following code and got the error: Unexpected identifier.
Could anyone check my code and give any advice, please?

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 

script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> 
$( document ).ready(function() { 

var synButtonName='Start Sync'; 

if('{!Quote.IsSyncing}'=='true') 
{ synButtonName='Stop Sync'; 

$('[name="Validar Propuesta"]').attr('value', synButtonName); }); 

</script>
  • February 03, 2017
  • Like
  • 0
Hi all,

I would need help with this formula. I get a message: Syntax error. Any idea, please?

IF ( PotentialCOMAPABudget__c  < 200.000,"Bajo",

IF ( PotentialCOMAPABudget__c > 200.000 < 1.000.000, "Medio", 

IF ( PotentialCOMAPABudget__c > 1.000.000, "Alto",

IF (  PotentialCOMAPABudget__c > 5.000.000, "Key Account", null

)
)
)
)
  • February 03, 2017
  • Like
  • 0
Hi all,

I created a default value from country object. I need that IVA custom field value (it is a percentaje value), display in IVA custom field value of opportunity object.
The question is that I have 21% as a IVA value in the country object and on the other hand, I have 0,21 % as a IVA value in the opportunity object.
Any idea about why I have different values?. Both fields are percentaje.

Thanks in advance
  • February 03, 2017
  • Like
  • 0
I need to create a price books with products logo.

Any idea?. I would apprecite it.

Thanks,

Amaya
  • February 02, 2017
  • Like
  • 0
Hi all,
I need to capture an approval comments to populate a lead custom field when the lead status = unqualified and the step status = rejected. I have an error compilation like "Error: Compile Error: Variable does not exist: Lead at line 14 column 109"
Here is my code. Any help?
trigger Unqualified on Lead (before update) {
//Get all approval process records from an approval process definition. ProcessDefinitionId = The ID of this approval process instance.TargetObjectId = ID of the object affected by this approval process instance.//
List<ProcessInstance> instances = [SELECT Id,TargetObjectId,(SELECT Id, StepStatus, Comments FROM Steps) FROM ProcessInstance Where ProcessDefinitionId  = '[ TargetObjectId]'];

//guarda la información de los leads. Declara e inicializa. List (nombre del objeto)//
List<Lead> Leads = New List <Lead>(); 

//Create a set of object Ids which has process instance//
    for(ProcessInstance pi:instances){
        LeadIds.add(pi.TargetobjectId);
    }
 
//Query for related records//
Map<Id,Lead> LeadMap = new Map<Id,Lead>([Select ReasonRejectedByCommercialPlanning__c from Lead Where Id in:Lead]);

//populate object's reason rejected field from approval comments
if (l.status == 'Unqualified')
    if (l.recordtypeId == '0121A000000QeSxQAK')
    for(ProcessInstance pi:instances){
       for (ProcessInstanceStep step : pi.Steps) {
         if(step.Status == 'Rejected') {
            LeadMap.get(pi.TargetObjectId).ReasonRejectedByCommercialPlanning__c = step.Comments;
         }
       }
    }

//Update your object//
update LeadMap.values();
  • January 31, 2017
  • Like
  • 0
Hello All,

I have create a custom button. I need that the code validation that: "Lead status" is open and custom field "country" is not null. Any idea??.
Here is my code:
{!REQUIRESCRIPT("/soap/ajax/38.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/38.0/apex.js")}

status = "{!Lead.Status}"; 
Country__c = "{! Lead.Country}";
if (status == ('Open'),
if (Country__c  != ('null'){ 
var lead = new sforce.SObject('Lead'); 
lead.id = "{!Lead.Id}"; 
lead.Status = "Pending conversion"; 
result = sforce.connection.update([lead]); 
location.reload(true); 
}
else{ 
alert("Invalid status. You can only submit to conversion the Lead if the status is ('Open"); 
}
 
  • January 25, 2017
  • Like
  • 0
Hi all,

I would need that if a user select a piclist field value, another text field can´t be blank.

Here is my code. Any help, please?

AND (
ISPICKVAL( Status  , "Unqualified"),
 NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))

 )
  • February 10, 2017
  • Like
  • 1
This rule works however, if the user chooses other value in the Stage name and chooses a required value for Product Support, this value doesn´t save. Any idea??. Thanks. Note: both field are picklist

IF(

 ISPICKVAL( StageName , "5 - Qualification"),

 ISPICKVAL( Product_Support__c, "None"),true)
  • February 10, 2017
  • Like
  • 1
Hi all,

I need that the following fields can´t be modified if they have a value and be new records. do you have any idea why this validation rule doesn´t work?. Thanks

AND ( OR (ISCHANGED( Canal__c )), 

         OR (ISCHANGED( CampanyaActual__c )),
       
            OR (ISCHANGED( LeadSource ))

)
  • July 04, 2017
  • Like
  • 0
Hi all,

I would need to validate differents options. If Lead Status is "Unqualified", Reason rejected must be filled but if lead status is open or pending or
qualified, the reason rejected must not be filled. Here is my code. Any help?
AND( 
ISPICKVAL(Status ,"Unqualified"), 
ISBLANK( ReasonRejectedByCommercialPlanning__c ))
OR
ISPICKVAL(Status ,"Open")
NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))
||
ISPICKVAL(Status ,"Pending")
NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))

Many thanks
  • March 02, 2017
  • Like
  • 0
Hi all,

I would need a button with 3 conditions. However, the phone condition doesn´t work. Any idea?. Thanks in advance
 
{!REQUIRESCRIPT("/soap/ajax/38.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/38.0/apex.js")}


var status = "{!Lead.Status}";
var Cartera__c = "{!Lead.Cartera__c}";
var Phone = "{!Lead.Phone}";
if (status == "Open" || status == "Assigned"){
if(Cartera__c!= null && Cartera__c!=""){
if(Phone != null && Phone !=""){
var lead = new sforce.SObject('Lead');
lead.id = "{!Lead.Id}";
lead.Status = "Pending conversion";
result = sforce.connection.update([lead]);
location.reload(true);
}
}else{
alert('Cartera Cannot be null');
}
}else{
alert("Invalid status. You can only submit to conversion the Lead if the status is Open or Assigned");
}
  • February 28, 2017
  • Like
  • 0
Hi all,

I would need that if a user select a piclist field value, another text field can´t be blank.

Here is my code. Any help, please?

AND (
ISPICKVAL( Status  , "Unqualified"),
 NOT (ISBLANK( ReasonRejectedByCommercialPlanning__c ))

 )
  • February 10, 2017
  • Like
  • 1
This rule works however, if the user chooses other value in the Stage name and chooses a required value for Product Support, this value doesn´t save. Any idea??. Thanks. Note: both field are picklist

IF(

 ISPICKVAL( StageName , "5 - Qualification"),

 ISPICKVAL( Product_Support__c, "None"),true)
  • February 10, 2017
  • Like
  • 1
Hi all,

I would need help with this formula. I get a message: Syntax error. Any idea, please?

IF ( PotentialCOMAPABudget__c  < 200.000,"Bajo",

IF ( PotentialCOMAPABudget__c > 200.000 < 1.000.000, "Medio", 

IF ( PotentialCOMAPABudget__c > 1.000.000, "Alto",

IF (  PotentialCOMAPABudget__c > 5.000.000, "Key Account", null

)
)
)
)
  • February 03, 2017
  • Like
  • 0
I need to create a price books with products logo.

Any idea?. I would apprecite it.

Thanks,

Amaya
  • February 02, 2017
  • Like
  • 0
Hi all,
I need to capture an approval comments to populate a lead custom field when the lead status = unqualified and the step status = rejected. I have an error compilation like "Error: Compile Error: Variable does not exist: Lead at line 14 column 109"
Here is my code. Any help?
trigger Unqualified on Lead (before update) {
//Get all approval process records from an approval process definition. ProcessDefinitionId = The ID of this approval process instance.TargetObjectId = ID of the object affected by this approval process instance.//
List<ProcessInstance> instances = [SELECT Id,TargetObjectId,(SELECT Id, StepStatus, Comments FROM Steps) FROM ProcessInstance Where ProcessDefinitionId  = '[ TargetObjectId]'];

//guarda la información de los leads. Declara e inicializa. List (nombre del objeto)//
List<Lead> Leads = New List <Lead>(); 

//Create a set of object Ids which has process instance//
    for(ProcessInstance pi:instances){
        LeadIds.add(pi.TargetobjectId);
    }
 
//Query for related records//
Map<Id,Lead> LeadMap = new Map<Id,Lead>([Select ReasonRejectedByCommercialPlanning__c from Lead Where Id in:Lead]);

//populate object's reason rejected field from approval comments
if (l.status == 'Unqualified')
    if (l.recordtypeId == '0121A000000QeSxQAK')
    for(ProcessInstance pi:instances){
       for (ProcessInstanceStep step : pi.Steps) {
         if(step.Status == 'Rejected') {
            LeadMap.get(pi.TargetObjectId).ReasonRejectedByCommercialPlanning__c = step.Comments;
         }
       }
    }

//Update your object//
update LeadMap.values();
  • January 31, 2017
  • Like
  • 0
Hello All,

I have create a custom button. I need that the code validation that: "Lead status" is open and custom field "country" is not null. Any idea??.
Here is my code:
{!REQUIRESCRIPT("/soap/ajax/38.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/38.0/apex.js")}

status = "{!Lead.Status}"; 
Country__c = "{! Lead.Country}";
if (status == ('Open'),
if (Country__c  != ('null'){ 
var lead = new sforce.SObject('Lead'); 
lead.id = "{!Lead.Id}"; 
lead.Status = "Pending conversion"; 
result = sforce.connection.update([lead]); 
location.reload(true); 
}
else{ 
alert("Invalid status. You can only submit to conversion the Lead if the status is ('Open"); 
}
 
  • January 25, 2017
  • Like
  • 0