• Andrew North
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies

Hey all

Hope you can help, I'm currently reviewing the Accounts that we hold within My Org and have found that we have almost 25k.

I'm planning on tidying this mess up.

At the moment, I've restricted the rights so that it's only myself and a colleague who can create new Accounts, this forces end users or ourselves to first search for an account to check if it exists, if not then we will create it on their behalf.

How would be best to approach this scenario?

I'm thinking to first delete any 'dead' accounts e.g. those that do not hold any information or linked objects such as Opp's, Frameworks, contacts etc.

Is there an option to filter all of the duplicate or similar Account names so that they can be merged?

If anyone has any ideas, documentation, best practices or advice then please point me in the right direction.

Thank you

Hi Guys, I really hope you can help

I'm attampting to push a change (2 apex classes) from my 'Config' sandbox to the production environment.

However, when i push my change I get 2 errors, as I'm not a Salesforce developer I'm having a hard time resolving these issues.

The Code is as follows

1)
@isTest
private class BW_RevenueScheduleBatchTest{
        static testMethod void testBW_RevenueScheduleBatch(){
                Profile p;
                User u;
                Account parentAcc;

                Account acc;
                Opportunity opp;
                Profit_Centre_Split__c secondaryPcs;
                Framework__c fw;
                Sector_Head_Mappings__c sectorHeadCS;
                p = TestData.createProfile();

                u = TestData.createTestUser(p);
                                TestData.u=u;
                parentAcc=TestData.createAccount();
                sectorHeadCS = TestData.createSectorCustomSetting(u);

                acc = TestData.createAccount(parentAcc);
                fw =  TestData.createFrameWork(acc);
                opp = TestData.createOpportunity(acc.id,fw.id);
                opp.Legacy_Source_System__c='Capsule';
                update opp;
                secondaryPcs = TestData.createSecondaryProfitCentre(opp);

                    database.executeBatch(new BW_RevenueScheduleBatch());
        }
}

 



2)
@isTest (seeAllData = true) 
public class HomePageReportControllerTest{ 

static testMethod void testHomePageReportcontroller(){         
TestData.createAll();          

System.runAs(TestData.u){  
//create an opp closing in the future...
Opportunity o = TestData.createOpportunity(TestData.acc.Id, TestData.fw.Id);            o.closeDate = system.today().addDays(5);
o.Contract_start_date__c = System.today().addDays(5);            o.Latest_status_and_next_steps__c = 'updated date';
update o;       

 PageReference pageRef = Page.MyRecentDashboard;           Test.setCurrentPage(pageRef);           
HomePageReportController hprc = new HomePageReportcontroller();           system.assert(hprc.pipelineReportId != null);           system.assert(hprc.revenueReportId != null);           system.assert(hprc.winlossReportId != null);                   
 }             
 } 
}



The errors I receive are below

1) System.DmlException: Upsert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityTrigger: execution of AfterUpdate caused by: System.AsyncException: Future method cannot be called from a future or batch method: SubscriberHelper.evaluateOpptyRulesFuture(Set<Id>) Trigger.OpportunityTrigger: line 29, column 1: []
Stack Trace: Class.BW_RevenueScheduleBatch.execute: line 44, column 1

2) System.QueryException: List has no rows for assignment to SObject
Stack Trace: Class.HomePageReportController.getReportId: line 18, column 1 Class.HomePageReportController.<init>: line 10, column 1 Class.HomePageReportControllerTest.testHomePageReportcontroller: line 17, column 1

If anyone could kindly advise or point me in the right direction of how this can be resolved I would be extremely grateful.

Thank you
Hi

We have a visualforce section on all of our Opportortunity page layouts.
This section shows a particular image depending on what has been selected within the stage field.
Below is a sample of the code that we have in place.
Is it possible to split it up so that depending on which Opportunity Record Type is selected different images can be displayed against each stage?

For example if record type = X and the stage is Closed Won then show image A
If record type = Y and the Stage is closed Won then show image B

Thank you
 
<apex:page standardController="Opportunity" showHeader="true" sidebar="true">

<div align="center">

></apex:image> <apex:image id="won" value="{!$Resource.stageWon}" height="60" rendered="{!Opportunity.stageName = 'Closed Won'}"

 ></apex:image> <apex:image id="lost" value="{!$Resource.stageLost}" height="60" rendered="{!Opportunity.stageName = 'Closed Lost'}" 

</div>

</apex:page>

 

Hi

We have a visualforce section on all of our Opportortunity page layouts.
This section shows a particular image depending on what has been selected within the stage field.

Below is a sample of the code that we have in place.
Is it possible to split it up so that depending on which Opportunity Record Type is selected different images can be displayed against each stage?

For example if record type = X and the stage is Closed Won then show image A

If record type = Y and the Stage is closed Won then show image B

Thank you

<apex:page standardController="Opportunity" showHeader="true" sidebar="true">

<div align="center">

></apex:image> <apex:image id="won" value="{!$Resource.stageWon}" height="60" rendered="{!Opportunity.stageName = 'Closed Won'}" ></apex:image> <apex:image id="lost" value="{!$Resource.stageLost}" height="60" rendered="{!Opportunity.stageName = 'Closed Lost'}" 

</div>

</apex:page>

Hey all

Hope you can help, I'm currently reviewing the Accounts that we hold within My Org and have found that we have almost 25k.

I'm planning on tidying this mess up.

At the moment, I've restricted the rights so that it's only myself and a colleague who can create new Accounts, this forces end users or ourselves to first search for an account to check if it exists, if not then we will create it on their behalf.

How would be best to approach this scenario?

I'm thinking to first delete any 'dead' accounts e.g. those that do not hold any information or linked objects such as Opp's, Frameworks, contacts etc.

Is there an option to filter all of the duplicate or similar Account names so that they can be merged?

If anyone has any ideas, documentation, best practices or advice then please point me in the right direction.

Thank you

Hi

We have a visualforce section on all of our Opportortunity page layouts.
This section shows a particular image depending on what has been selected within the stage field.
Below is a sample of the code that we have in place.
Is it possible to split it up so that depending on which Opportunity Record Type is selected different images can be displayed against each stage?

For example if record type = X and the stage is Closed Won then show image A
If record type = Y and the Stage is closed Won then show image B

Thank you
 
<apex:page standardController="Opportunity" showHeader="true" sidebar="true">

<div align="center">

></apex:image> <apex:image id="won" value="{!$Resource.stageWon}" height="60" rendered="{!Opportunity.stageName = 'Closed Won'}"

 ></apex:image> <apex:image id="lost" value="{!$Resource.stageLost}" height="60" rendered="{!Opportunity.stageName = 'Closed Lost'}" 

</div>

</apex:page>