• Matthew Loh
  • NEWBIE
  • 70 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 10
    Questions
  • 17
    Replies
If my organization uses Professional, but the other organization that I am connected to uses Enterprise or Unlimited, will this affect the functionality of Salesforce-to-Salesforce?

It mentions here (https://help.salesforce.com/articleView?id=business_network_tips.htm&language=en_US&type=0) that it is available in "Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions" but doesn't specifically state whether both orgs need to be on the same edition. 

Thanks!
I am referring to the Contract object.

My org has a handover between the Sales and Tech teams, because after customers sign our contracts, we upload them to use the submit approval to get it to go to the tech team.

However, the tech team requires the signed contract. Right now the email template works fine, because it gives the link to that Contract but there are extra steps required to click the attachment then having to download it.

I saw some apps on the appexchange which allow emails to be sent with attachments, but these are manual email buttons and are not automated within the approval process. This means users would have to click send email --> select template --> select attachments --> select email recipient --> send.

What I would like is so that the moment the record is submitted for approval, the email template goes together with all attachments on that object. 

Is this possible? I saw some discussion https://developer.salesforce.com/forums/?id=906F00000008xAUIAY here about email attachments and PDFs in a custom VF page, but I'm not sure it's to the same goal I am trying to achieve.

Any insight would be greatly appreciated.

Thank you!

I have created an action in process builder to Create a new contract once the Opportunity stage = Closed Won.

This is occurs when a record is created or edited, and I have unchecked the checkbox asking whether to Allow process to evaluate a record multiple times.

So the criteria to be met is Opportunity Stage = Closed Won

The first action I have written is to create a new contract, with the fields as follows:

 

User-added image
However, similar to how there is a lookup field on Contract Stage to link back to Account and (in this case, I have created another custom lookup field to link to Opportunity) Opportunity as well, I would like to have a lookup field on Opportunity stage to link to Accounts.

This Contract field on Opportunity object is just the mirror image of the Opportunity lookup on Contract object.

What I want to do is be able to, upon marking the Opportunity as Closed Won,

1) Create a new contract (all good this works already)

2) Update the previously empty Contract lookup field on Opportunity object with the Contract ID of the newly created contract.

I am having trouble completing step 2. 

I tried adding another action to Update the contract lookup field on Opportunity object 

User-added image
But upon marking an opportunity as closed won, I get the following error

 

An error occurred at element myRule_1_A3 (FlowRecordUpdate).
The flow failed to access the value for myVariable_current.Contract.Id because it hasn't been set or assigned.

Any ideas on how to automate this? Ideally, I would want users to be able to access the corresponding Contract immediately upon marking the Opportunity as Closed Won, as opposed to having to go to Contract object and searching for that contract.

I swear I'm somewhere close to the answer as I can successfully import the ID of the opportunity when creating a new contract (see first photo I inserted above)

Thanks!
Hi everyone

Merry Christmas!!!

My org does almost all our sales from Parent (Partners), and as such every lead has a parent account attached to it. What I want to do is make it so that upon lead conversion, the parent account ID is automatically there in Account Stage.

As it stands, I cannot do custom field mapping from lead stage as the Parent Account (hierarchy) field is a default field.

So what I have done is mapped the Restricted Picklist of Parent_Account__c from lead stage to a restricted picklist called Parent_acc_mapped__c in Account Stage.

I then went to process builder and created a process where it executes the Object Account (when a new record is created or edited).

The criteria was:
Parent_acc_mapped__c ISNULL = FALSE
AND
ParentID ISNULL = TRUE
AND
parent_acc_mapped__c DOESNOTEQUAL ParentID
This is so that it only updates it for those converted from lead stage, whereas users who skip that and go straight to creating a new account can pick the parent account as they wish.

The action to be executed upon meeting those criteria are: 

Update a record
Parent Account ID FORMULA TEXT([Account].Parent_Acc_mapped__c )

I have made sure that every one of the picklist options that can be selected are already Accounts themselves so that they can be made Parents.

However upon activating this process and testing a lead conversion, I get this error:
 
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3016F000000Xjcv. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.handleRegularAccountInserts: line 226, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 88, column 1


As seen in the image : 
User-added image

I suspect it has something to do with the fact that Parent Account is an ID field and my picklist is, well, a picklist.

I normally use the REFERENCE field__c instead of FORMULA TEXT(field__c), but in this case it didn't allow me since one was an ID field and the other was a picklist.

Any ideas on how this can be solved? It is tedious having to update the Parent Account of each account individually upon lead conversion.

I tried writing an Apex trigger in my Developer Edition as referenced in my other post here https://developer.salesforce.com/forums/ForumsMain?id=9060G000000XiSjQAK but upon running it, nothing happened upon lead conversion. It's as if nothing changed.

Would appreciate any advice on this please! :)

Once again, Merry Christmas!!!

Hi all. 

Firstly Merry Christmas! :)

My org does basically all of our sales from Partners, and each partner has a different pricing strategy. Within each partner there are also 2 types of services, so really for one partner we are talking about 2 different values which must be calculated. (E.g. Partner 1 AND Service 1, Partner 1 AND Service 2, Partner 2 AND Service 1, etc...)


Both Partner__c and Service__c are restricted picklists (hence why I used TEXT(picklist_field__c) = "blablabla" below.

The expected revenue for each partner would always be based upon 2 custom currency fields, its

I'd like to be able to generate forecasts/dashboard based on expected revenue of each opportunity.

After finding a similar post and using the best-selected answer here https://success.salesforce.com/answers?id=90630000000h1saAAA

I have come up with:
IF(AND(TEXT(Partner__c) = "Partner 1",TEXT(Service__c) = "Service 1",  Annual_turnover__c  * 0.1,
IF(AND(TEXT(Partner__c) = "Partner 2",TEXT(Service__c) = "Service 2",  Annual_turnover__c  * 0.2,
0))
but I keep getting Syntax errors (e.g. extra ")", and when I remove that it becomes extra ",", etc. etc.)

I'm using a simplified version of the expression that needs to be calculated because it's actually going to be something like annual_turnover__c * 0.2 + annual_transactions * 0.1 

But that's simple to implement once I get the actual formula right with the IF AND conditions.

Any ideas on what I'm doing wrong? This is doing my head in on Christmas eve haha :)

I considered using CASE for this formula, but I read in that post I linked above that you can't use Nested IF statements within a CASE Function.

Thanks guys and Merry Christmas!!! :)
 

Hi all

My org does basically all of our sales from Partners, and each partner has a different pricing strategy.

I'd like to be able to generate forecasts/dashboard based on expected revenue of each opportunity.

This expected revenue will be a formula field returning numbers/currency. I cannot use the standard Opportunity Amount field because it is based on Product price * quantity, and we do not have products. We have pricing agreements with all these different clients based on the Partner that they originated from.

As such, each partner has a different pricing strategy. For each lead, we would have their total turnover, but the actual revenue to my organisation is always a percentage of that turnover plus a fee multiplied by the number of transactions they carry out

I was thinking of a formula field where it look something like this, but I'm not sure what syntax to use. 

**Note: there is a custom field for Parent Account mapped over from Lead stage, so every opportunity will have a value in this field from a restricted picklist**
 

IF Parent Account = Partner A, then (1% * annual_turnover__c + $0.1 * annual_transactions__c)
IF Parent Account = Partner B, then (2% * annual_turnover__c + $0.2 * annual_transactions__c)
IF Parent Account = Partner C, then (3% * annual_turnover__c + $0.3 * annual_transactions__c)
 

You get the idea.

Any idea on how I can implement this?  I found some discussion on this on the forums, but they required the field to return a simple text value upon several IF conditions. I wasn't sure if that was suitable, because I need it to perform a different calculation upon each condition.

Thanks!

Referring to this post: https://developer.salesforce.com/forums/?id=906F00000008l8SIAQ
I tried the "best answer" from that thread, but I get the error "expecting right curly bracket, found '<'".

The "best answer" was:
 
trigger populateParentAccount on Account (before Insert){<br> List<Lead> convertedLeads=[SELECT Id, ConvertedAccountID, Lead_Parent__c<br> FROM Lead WHERE IsConverted=True AND ConvertedAccountId IN :trigger.new];<br> Map<ID,ID> acctParentMap=new Map<ID,ID>();<br> for (lead l: convertedleads){<br> acctParentMap.put(l.ConvertedAccountId,l.Lead_Parent__c);<br> }<br> for (account a:trigger.new){<br> if (acctParentMap.containsKey(a.Id)){<br> a.<font color="#ff0000">ParentId</font>=acctParentMap.get(a.Id);<br> }<br> }<br>}


Note, I'm using Salesforce Professional edition so Apex isn't natively opened to me. Upgrading everyone to enterprise is out of the question, so  I was hoping to create a trigger in d eveloper edition, then install it as a package in my production, as suggested here: https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/dev_packages_apex_ge_pe.htm . 

Automating this "Parent Account" field would be a lifesafer, because the way our sales works is ALL of our leads have a Lead Parent (a custom picklist which I've added in Lead Stage).

I am also new to Salesforce, please be nice! :( Just started using it a couple of weeks ago and I'm trying to get all our sales processes streamlined before the volume of our leads pick up.

 Having to manually add the Parent Account everytime a Lead is converted is very inefficient, so I would really like to find a way to make this automatic. Since I can't map the lead fields to Parent Account because that is a look-up field.

Thank you!

Referencing this unsolved post: https://success.salesforce.com/answers?id=90630000000h86rAAA

The ISBLANK (ParentID) formula doesn't actually tell me if it is a parent, it simply checks to see if there is a Parent ID.

My organization has multi-level hierarchies with our accounts, such as Grandparent --> Parent --> Child

The ISBLANK checkbox only works for the very top level (i.e. Grandparent) and doesn't work at the 2nd (Parent Level). 

I'd like to be able to find out if an Account has children accounts beneath it, not whether there are parents above it. Because it can be the case that an Account is both a parent and a child account.

 

Hey everyone

I'm on Salesforce Classic, and am a sytem admin.

I have enabled "Development Mode" in my user profile, but everytime I go to Dev mode from My name --> Development Mode

and click New --> Apex Trigger, this option is greyed out and I can't click it. See attached image

User-added image

Can someone please help me out? I'm new to SF :( sorry for such a silly question

I'd like to be able to see from the Accounts level stage if an Account is a parent of something else, without clicking "View Account" hierarchy.

Now I was going to automate this by using this "true/false" field and then using the Highligher Salesforce app to highlight the field in a certain colour if it was a parent account, or it was a child account

This way I can look at the Account and depending on the colour, automatically know if it was a parent or a child account.

I swear there is an ability to create an IF function for this, but I don't know how to set the parameters to check to see if an account has a hierarchy

I have created an action in process builder to Create a new contract once the Opportunity stage = Closed Won.

This is occurs when a record is created or edited, and I have unchecked the checkbox asking whether to Allow process to evaluate a record multiple times.

So the criteria to be met is Opportunity Stage = Closed Won

The first action I have written is to create a new contract, with the fields as follows:

 

User-added image
However, similar to how there is a lookup field on Contract Stage to link back to Account and (in this case, I have created another custom lookup field to link to Opportunity) Opportunity as well, I would like to have a lookup field on Opportunity stage to link to Accounts.

This Contract field on Opportunity object is just the mirror image of the Opportunity lookup on Contract object.

What I want to do is be able to, upon marking the Opportunity as Closed Won,

1) Create a new contract (all good this works already)

2) Update the previously empty Contract lookup field on Opportunity object with the Contract ID of the newly created contract.

I am having trouble completing step 2. 

I tried adding another action to Update the contract lookup field on Opportunity object 

User-added image
But upon marking an opportunity as closed won, I get the following error

 

An error occurred at element myRule_1_A3 (FlowRecordUpdate).
The flow failed to access the value for myVariable_current.Contract.Id because it hasn't been set or assigned.

Any ideas on how to automate this? Ideally, I would want users to be able to access the corresponding Contract immediately upon marking the Opportunity as Closed Won, as opposed to having to go to Contract object and searching for that contract.

I swear I'm somewhere close to the answer as I can successfully import the ID of the opportunity when creating a new contract (see first photo I inserted above)

Thanks!
I am referring to the Contract object.

My org has a handover between the Sales and Tech teams, because after customers sign our contracts, we upload them to use the submit approval to get it to go to the tech team.

However, the tech team requires the signed contract. Right now the email template works fine, because it gives the link to that Contract but there are extra steps required to click the attachment then having to download it.

I saw some apps on the appexchange which allow emails to be sent with attachments, but these are manual email buttons and are not automated within the approval process. This means users would have to click send email --> select template --> select attachments --> select email recipient --> send.

What I would like is so that the moment the record is submitted for approval, the email template goes together with all attachments on that object. 

Is this possible? I saw some discussion https://developer.salesforce.com/forums/?id=906F00000008xAUIAY here about email attachments and PDFs in a custom VF page, but I'm not sure it's to the same goal I am trying to achieve.

Any insight would be greatly appreciated.

Thank you!

I have created an action in process builder to Create a new contract once the Opportunity stage = Closed Won.

This is occurs when a record is created or edited, and I have unchecked the checkbox asking whether to Allow process to evaluate a record multiple times.

So the criteria to be met is Opportunity Stage = Closed Won

The first action I have written is to create a new contract, with the fields as follows:

 

User-added image
However, similar to how there is a lookup field on Contract Stage to link back to Account and (in this case, I have created another custom lookup field to link to Opportunity) Opportunity as well, I would like to have a lookup field on Opportunity stage to link to Accounts.

This Contract field on Opportunity object is just the mirror image of the Opportunity lookup on Contract object.

What I want to do is be able to, upon marking the Opportunity as Closed Won,

1) Create a new contract (all good this works already)

2) Update the previously empty Contract lookup field on Opportunity object with the Contract ID of the newly created contract.

I am having trouble completing step 2. 

I tried adding another action to Update the contract lookup field on Opportunity object 

User-added image
But upon marking an opportunity as closed won, I get the following error

 

An error occurred at element myRule_1_A3 (FlowRecordUpdate).
The flow failed to access the value for myVariable_current.Contract.Id because it hasn't been set or assigned.

Any ideas on how to automate this? Ideally, I would want users to be able to access the corresponding Contract immediately upon marking the Opportunity as Closed Won, as opposed to having to go to Contract object and searching for that contract.

I swear I'm somewhere close to the answer as I can successfully import the ID of the opportunity when creating a new contract (see first photo I inserted above)

Thanks!
Hi everyone

Merry Christmas!!!

My org does almost all our sales from Parent (Partners), and as such every lead has a parent account attached to it. What I want to do is make it so that upon lead conversion, the parent account ID is automatically there in Account Stage.

As it stands, I cannot do custom field mapping from lead stage as the Parent Account (hierarchy) field is a default field.

So what I have done is mapped the Restricted Picklist of Parent_Account__c from lead stage to a restricted picklist called Parent_acc_mapped__c in Account Stage.

I then went to process builder and created a process where it executes the Object Account (when a new record is created or edited).

The criteria was:
Parent_acc_mapped__c ISNULL = FALSE
AND
ParentID ISNULL = TRUE
AND
parent_acc_mapped__c DOESNOTEQUAL ParentID
This is so that it only updates it for those converted from lead stage, whereas users who skip that and go straight to creating a new account can pick the parent account as they wish.

The action to be executed upon meeting those criteria are: 

Update a record
Parent Account ID FORMULA TEXT([Account].Parent_Acc_mapped__c )

I have made sure that every one of the picklist options that can be selected are already Accounts themselves so that they can be made Parents.

However upon activating this process and testing a lead conversion, I get this error:
 
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3016F000000Xjcv. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.handleRegularAccountInserts: line 226, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 88, column 1


As seen in the image : 
User-added image

I suspect it has something to do with the fact that Parent Account is an ID field and my picklist is, well, a picklist.

I normally use the REFERENCE field__c instead of FORMULA TEXT(field__c), but in this case it didn't allow me since one was an ID field and the other was a picklist.

Any ideas on how this can be solved? It is tedious having to update the Parent Account of each account individually upon lead conversion.

I tried writing an Apex trigger in my Developer Edition as referenced in my other post here https://developer.salesforce.com/forums/ForumsMain?id=9060G000000XiSjQAK but upon running it, nothing happened upon lead conversion. It's as if nothing changed.

Would appreciate any advice on this please! :)

Once again, Merry Christmas!!!

Hi all. 

Firstly Merry Christmas! :)

My org does basically all of our sales from Partners, and each partner has a different pricing strategy. Within each partner there are also 2 types of services, so really for one partner we are talking about 2 different values which must be calculated. (E.g. Partner 1 AND Service 1, Partner 1 AND Service 2, Partner 2 AND Service 1, etc...)


Both Partner__c and Service__c are restricted picklists (hence why I used TEXT(picklist_field__c) = "blablabla" below.

The expected revenue for each partner would always be based upon 2 custom currency fields, its

I'd like to be able to generate forecasts/dashboard based on expected revenue of each opportunity.

After finding a similar post and using the best-selected answer here https://success.salesforce.com/answers?id=90630000000h1saAAA

I have come up with:
IF(AND(TEXT(Partner__c) = "Partner 1",TEXT(Service__c) = "Service 1",  Annual_turnover__c  * 0.1,
IF(AND(TEXT(Partner__c) = "Partner 2",TEXT(Service__c) = "Service 2",  Annual_turnover__c  * 0.2,
0))
but I keep getting Syntax errors (e.g. extra ")", and when I remove that it becomes extra ",", etc. etc.)

I'm using a simplified version of the expression that needs to be calculated because it's actually going to be something like annual_turnover__c * 0.2 + annual_transactions * 0.1 

But that's simple to implement once I get the actual formula right with the IF AND conditions.

Any ideas on what I'm doing wrong? This is doing my head in on Christmas eve haha :)

I considered using CASE for this formula, but I read in that post I linked above that you can't use Nested IF statements within a CASE Function.

Thanks guys and Merry Christmas!!! :)
 

Hi all

My org does basically all of our sales from Partners, and each partner has a different pricing strategy.

I'd like to be able to generate forecasts/dashboard based on expected revenue of each opportunity.

This expected revenue will be a formula field returning numbers/currency. I cannot use the standard Opportunity Amount field because it is based on Product price * quantity, and we do not have products. We have pricing agreements with all these different clients based on the Partner that they originated from.

As such, each partner has a different pricing strategy. For each lead, we would have their total turnover, but the actual revenue to my organisation is always a percentage of that turnover plus a fee multiplied by the number of transactions they carry out

I was thinking of a formula field where it look something like this, but I'm not sure what syntax to use. 

**Note: there is a custom field for Parent Account mapped over from Lead stage, so every opportunity will have a value in this field from a restricted picklist**
 

IF Parent Account = Partner A, then (1% * annual_turnover__c + $0.1 * annual_transactions__c)
IF Parent Account = Partner B, then (2% * annual_turnover__c + $0.2 * annual_transactions__c)
IF Parent Account = Partner C, then (3% * annual_turnover__c + $0.3 * annual_transactions__c)
 

You get the idea.

Any idea on how I can implement this?  I found some discussion on this on the forums, but they required the field to return a simple text value upon several IF conditions. I wasn't sure if that was suitable, because I need it to perform a different calculation upon each condition.

Thanks!

Referring to this post: https://developer.salesforce.com/forums/?id=906F00000008l8SIAQ
I tried the "best answer" from that thread, but I get the error "expecting right curly bracket, found '<'".

The "best answer" was:
 
trigger populateParentAccount on Account (before Insert){<br> List<Lead> convertedLeads=[SELECT Id, ConvertedAccountID, Lead_Parent__c<br> FROM Lead WHERE IsConverted=True AND ConvertedAccountId IN :trigger.new];<br> Map<ID,ID> acctParentMap=new Map<ID,ID>();<br> for (lead l: convertedleads){<br> acctParentMap.put(l.ConvertedAccountId,l.Lead_Parent__c);<br> }<br> for (account a:trigger.new){<br> if (acctParentMap.containsKey(a.Id)){<br> a.<font color="#ff0000">ParentId</font>=acctParentMap.get(a.Id);<br> }<br> }<br>}


Note, I'm using Salesforce Professional edition so Apex isn't natively opened to me. Upgrading everyone to enterprise is out of the question, so  I was hoping to create a trigger in d eveloper edition, then install it as a package in my production, as suggested here: https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/dev_packages_apex_ge_pe.htm . 

Automating this "Parent Account" field would be a lifesafer, because the way our sales works is ALL of our leads have a Lead Parent (a custom picklist which I've added in Lead Stage).

I am also new to Salesforce, please be nice! :( Just started using it a couple of weeks ago and I'm trying to get all our sales processes streamlined before the volume of our leads pick up.

 Having to manually add the Parent Account everytime a Lead is converted is very inefficient, so I would really like to find a way to make this automatic. Since I can't map the lead fields to Parent Account because that is a look-up field.

Thank you!

Hey everyone

I'm on Salesforce Classic, and am a sytem admin.

I have enabled "Development Mode" in my user profile, but everytime I go to Dev mode from My name --> Development Mode

and click New --> Apex Trigger, this option is greyed out and I can't click it. See attached image

User-added image

Can someone please help me out? I'm new to SF :( sorry for such a silly question

I'd like to be able to see from the Accounts level stage if an Account is a parent of something else, without clicking "View Account" hierarchy.

Now I was going to automate this by using this "true/false" field and then using the Highligher Salesforce app to highlight the field in a certain colour if it was a parent account, or it was a child account

This way I can look at the Account and depending on the colour, automatically know if it was a parent or a child account.

I swear there is an ability to create an IF function for this, but I don't know how to set the parameters to check to see if an account has a hierarchy

I have a trigger on the Account object that is supposed to populate the Parent Account during Lead Conversion.  The trigger works fine for that purpose.  When a lead is converted, the Parent Account populates.

 

However, when someone creates an account (without going through the lead process) and populates the parent account, the parent account goes away when that person hits save.  That person has to then update the account again with the parent account information to get the parent account to stay populated.

 

I thought my trigger would only affect accounts created from lead conversion.  I've copied the code below.  Any ideas how I can correct this issue?

 

 

trigger populateParentAccount on Account (before Insert){
  List<Lead> convertedLeads=[SELECT Id, ConvertedAccountID, Parent_Account__c
    FROM Lead WHERE IsConverted=True AND ConvertedAccountId IN :trigger.new];
      Map<ID,ID> acctParentMap=new Map<ID,ID>();
        for (lead l: convertedleads){
            acctParentMap.put(l.ConvertedAccountId,l.Parent_Account__c);
              }
                for (account a:trigger.new){
                    if (acctParentMap.containsKey(a.Id)){
                          a.ParentId=acctParentMap.get(a.Id);
                              }  }}

 

 

Thanks so much!!

Brandi

  • September 03, 2010
  • Like
  • 1

I have a trigger on the Account object that is supposed to populate the Parent Account during Lead Conversion.  The trigger works fine for that purpose.  When a lead is converted, the Parent Account populates.

 

However, when someone creates an account (without going through the lead process) and populates the parent account, the parent account goes away when that person hits save.  That person has to then update the account again with the parent account information to get the parent account to stay populated.

 

I thought my trigger would only affect accounts created from lead conversion.  I've copied the code below.  Any ideas how I can correct this issue?

 

 

trigger populateParentAccount on Account (before Insert){
  List<Lead> convertedLeads=[SELECT Id, ConvertedAccountID, Parent_Account__c
    FROM Lead WHERE IsConverted=True AND ConvertedAccountId IN :trigger.new];
      Map<ID,ID> acctParentMap=new Map<ID,ID>();
        for (lead l: convertedleads){
            acctParentMap.put(l.ConvertedAccountId,l.Parent_Account__c);
              }
                for (account a:trigger.new){
                    if (acctParentMap.containsKey(a.Id)){
                          a.ParentId=acctParentMap.get(a.Id);
                              }  }}

 

 

Thanks so much!!

Brandi

  • September 03, 2010
  • Like
  • 1