• Euphoriste
  • NEWBIE
  • 75 Points
  • Member since 2020

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 13
    Replies
I have 2 objects Parent and Child. I have a Checkbox field called active in parent. Only one of the parent is active. I want to clone the active parent's child to new Parent using custom button.
 I wrote a class for cloning child for new Parent.
Code:

      
    public class TestCLoneChild {
       // public Parent__c parent{Get;Set;}
        public List<Child__c> ChildSO{get;Set;}
        public void getparent(Parent__c parent){
                Parent__c versionSO = [SELECT Id,(SELECT ID,Name,Data_Type__c FROM Child__r) FROM Parent__c WHERE Active__c = TRUE Limit 1];
            ChildSO= new List<Child__c>();
             for(Child__c attr : versionSO.Child__r){
                  Child__c childd= new Child__c();
                  childd.Name = attr.Name;
                  childd.Data_Type__c = attr.Data_Type__c;
                  childd.Version__c = version.Id;
                  ChildSO.add(childd);
                 } 
              upsert ChildSO;
              System.Debug('Child'+ChildSO);
            }
        }
How can call this class to clone Child Records for new parent.
Please suggest me some ideas.

Thanks in Advance.
Hi,

I have a field of total machines and some fileds giving the specs. The machines might be of type A or type B.
The user needs to fill in the total number of machines that need to be changed in a factory. Then, depending on the specs that the user will fill in for each of the changes (max 5 changes per request), I need to calculate how many machines are of type A and how many are of type B.

The number of machines for both types are calculated in formula [number] fields and I currently have this formula. However, this only takes into account the first spec:

IF((ispickval(Machine__c,'A')) ,(IF((ispickval(Machine2__c,'A')) ,(IF((ispickval(Machine3__c,'A')) ,(IF((ispickval(Machine4__c,'A')) ,(IF((ispickval(Machine5__c,'A')) ,(i__c+1), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c))

The above example refers to one of the machine types. "i" is a temp variable with an initial value of 0.

The MachineX__c fields can be either all blank or any of the fields can be filled in.

Could someone please help? Thanks!
Evrydiki
HI,

I am having a text field.I wnat a length validation on that.

AND(ISPICKVAL(Vertical__c,'HI'),NOT(LEN(Proposal_Application_Number__c)=10))

but it is not working.Field should only accept 10 digit numeric number for HI vertical.
Hi,
I'm trying to create a flow that is invoked on an object creation, checks whether some conditions are met and then waits for a field to be updated.
I've created a 'record triggered flow' and implemented everything till the 'wait' step. I saw that flows have an element called 'pause' that should allow me to wait for a field update but, for some reason, I don't see it in the toolbox. I only see 'Decision', 'Assignment' and 'Loop'.
Am I doing something wrong? 

 
Hello,
I am converting the following ask into a formula field:
  1. If Stage = Closed Lost, $0, otherwise
  2. If line level detail = Customer Credit, Product Churn or Product Deprecated, $0, otherwise
  3. if Amendment, use Total Price (no change), otherwise
  4. if Renewal and Line Type = Removed Product and Line Level Detail = Bundle Adjs, then “$0”, otherwise
  5. Total Price + ARR Removed
I have it written as such and I am receiving the error - 'Error: Incorrect Number if Parameters for function IF(). Expected 3, received 1"
 
IF(
   ISPICKVAL(Opportunity.StageName,"Closed Lost"),0,
     If( 
        Line_Level_Detail__c='Customer Credit' || Line_Level_Detail__c='Product Churn'  || Line_Level_Detail__c = 'Product Deprecated'), 0,
         IF(
            Opportunity_Record_Type__c  = 'Amendment'),  TotalPrice,
            IF(
               AND
                  ( Opportunity_Record_Type__c = 'Renewal',  Line_Level_Type__c = 'Removed Product',  Line_Level_Detail__c = 'Bundle Adjs'), 0,
                    TotalPrice  +  ARR_Removed__c
)
)
What am I missing in this formula?
 
I have 2 objects Parent and Child. I have a Checkbox field called active in parent. Only one of the parent is active. I want to clone the active parent's child to new Parent using custom button.
 I wrote a class for cloning child for new Parent.
Code:

      
    public class TestCLoneChild {
       // public Parent__c parent{Get;Set;}
        public List<Child__c> ChildSO{get;Set;}
        public void getparent(Parent__c parent){
                Parent__c versionSO = [SELECT Id,(SELECT ID,Name,Data_Type__c FROM Child__r) FROM Parent__c WHERE Active__c = TRUE Limit 1];
            ChildSO= new List<Child__c>();
             for(Child__c attr : versionSO.Child__r){
                  Child__c childd= new Child__c();
                  childd.Name = attr.Name;
                  childd.Data_Type__c = attr.Data_Type__c;
                  childd.Version__c = version.Id;
                  ChildSO.add(childd);
                 } 
              upsert ChildSO;
              System.Debug('Child'+ChildSO);
            }
        }
How can call this class to clone Child Records for new parent.
Please suggest me some ideas.

Thanks in Advance.
Hi,

I have a field of total machines and some fileds giving the specs. The machines might be of type A or type B.
The user needs to fill in the total number of machines that need to be changed in a factory. Then, depending on the specs that the user will fill in for each of the changes (max 5 changes per request), I need to calculate how many machines are of type A and how many are of type B.

The number of machines for both types are calculated in formula [number] fields and I currently have this formula. However, this only takes into account the first spec:

IF((ispickval(Machine__c,'A')) ,(IF((ispickval(Machine2__c,'A')) ,(IF((ispickval(Machine3__c,'A')) ,(IF((ispickval(Machine4__c,'A')) ,(IF((ispickval(Machine5__c,'A')) ,(i__c+1), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c))

The above example refers to one of the machine types. "i" is a temp variable with an initial value of 0.

The MachineX__c fields can be either all blank or any of the fields can be filled in.

Could someone please help? Thanks!
Evrydiki
I'm working on a custom classic email template using HTML and when I see the preview and when I test it in my browser, my alignment is good, but when I send a test email, the alignment is off.  

Any suggestions what I can do to resolve this?

Here is what it looks like in preview:
User-added image

Here is the email test:

User-added image
Here is a bit of my code:
<body style="font-family: Montserrat, sans-serif;">
<style>
	.progress{width: 80%; height: auto; margin:0 auto 0 auto; color: #404040; font-size: 14px; }
	.p{font: Montserrat, sans-serif; text-align: left; }
</style>

<table class="progress" cellpadding="2px">
	<tr>
		<td style="vertical-align: bottom; text-align: center;" >
			<img src="https://selectcomtelecom--c.na72.content.force.com/servlet/servlet.ImageServer?id=0151H0000085hCE&oid=00DA0000000gd8G&lastMod=1581343779000" alt="orange-circle" height:20 ></td>
		<td style="">
			<p><strong>Site Survey Scheduled</strong></p>
		</td>
	</tr>

	<tr>
		<td style="vertical-align: top; text-align: center;">
			<img src="https://selectcomtelecom--c.na72.content.force.com/servlet/servlet.ImageServer?id=0151H0000085hCJ&oid=00DA0000000gd8G&lastMod=1581343802000" alt="orange-line" height="120" ></td>
		<td style="vertical-align: top; font-size: 12px;">
			<p>Friday, February 7</p>
		</td>
	</tr>

	<tr>
		<td style="vertical-align: top; text-align: center;">
			<img src="https://selectcomtelecom--c.na72.content.force.com/servlet/servlet.ImageServer?id=0151H0000085hCO&oid=00DA0000000gd8G&lastMod=1581343827000" alt="grey-circles" height="20" ></td>
		<td style="vertical-align: top;">
			<p><strong>Order Received</strong></p>
		</td>
	</tr>

	<tr>
		<td style="vertical-align: top; text-align: center;">
			<img src="https://selectcomtelecom--c.na72.content.force.com/servlet/servlet.ImageServer?id=0151H0000085hCT&oid=00DA0000000gd8G&lastMod=1581343849000" alt="grey-lines" height="20" ></td>
		<td style="vertical-align: top;">
			<p></p>
		</td>
	</tr>

 
Hello,

I have two two picklists with same values per say
P1  P2
A     A
B     B
C     C

If I select A and B in P1 and select B and C in P2, I need to throw an error. Basically I need a validation rule to allow user to only select those values they selected in P1. I am a bit new to salesforce. Please help.

Regards,
Vineeth
My Flow finds a record, but I when I add a decision point to assess if the found lead is converted or not, the following error comes up.

The flow failed to access the value for FoundLead.IsConverted because it hasn't been set or assigned.

I checked the found lead's IsConverted status and it was TRUE, so I do not understand why Flow says it is not set or assigned. 

Do Flows not have access to this field?

Thanks for your help!
My Flow finds a record, but I when I add a decision point to assess if the found lead is converted or not, the following error comes up.

The flow failed to access the value for FoundLead.IsConverted because it hasn't been set or assigned.

I checked the found lead's IsConverted status and it was TRUE, so I do not understand why Flow says it is not set or assigned. 

Do Flows not have access to this field?

Thanks for your help!