• nensyi brijaniya
  • -1 Points
  • Member since 2022

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 6
I have a requirement to distribute the amount on Parent Account equally among all opportunities. The following code is throwing NULL pointer exception. Please help.

public static void distAmountEqually(List<Opportunity> oppList, map<Id,Opportunity>oldmap, boolean isInsert, boolean isUpdate){
        Set<Id> oppAccIds = New Set<Id>();
        Map<Id,List<opportunity>> mapAccToOpps = New Map<Id,List<opportunity>>();
        Integer noOfOpps = 0;
        List<Opportunity> oppsToUpdt = New List<Opportunity>();

        for(Opportunity opp:oppList){
        for(Account acc: [SELECT AnnualRevenue ,(SELECT Distributed_Amount__c FROM Opportunities) 
                          FROM Account WHERE Id IN :oppAccIds]){
                mapAccToOpps.put(acc.Id, new List<opportunity>());                
        for(Opportunity op:oppList){
                 noOfOpps= op.account.Opportunities.size();

                 for(Opportunity opy:mapAccToOpps.get(op.accountId)){
                    opy.Distributed_Amount__c = op.Account.AnnualRevenue / noOfOpps;
create the aura component for account with 4 fields & a save button in the aura component ???

went through all the docs, set up certs on the subdomain at AWS, set up a CNAME record pointing subdomain like subdomain.force.com.18CHARACTERORGID.live.siteforce.com

propogates fine through DNS servers but site access returns "site can't be reached" 

Any help appreciated

can we play Subway Surfers Mod APK offline game on app. Or anyone know any games of line on the app?
i downloaded the game https://techgara.com/subway-surfers (https://techgara.com/subway-surfers/)
Hi, we are looking for a London based Salefsforce developer/architect who can help us to connect a sign up form on Craft CMS (created by someone else) with Salesforce. Our aim is to create/update contacts and accounts and to create new campaign members.
Thank you


I'm using a visualforce button in custom object layout page to create related list record of another custom object. when I use the sforce.one.createrecord the SF1 navigate to the create record page but I cannot auto populate the fields just like in standard salesforce when I passed parameters in url.
the creation page looks like this:
User-added image 
The lookup fields in yellow should present a read only value that is taken from a parameter passed from.
Any solution for this or a workaround?