• KumarRajaBangari14
  • NEWBIE
  • 35 Points
  • Member since 2018
  • Sr. Salesforce Developer
  • EpiSource India Pvt Ltd

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 10
    Replies
Hi,

I have account object when i enter A in Acc filed  i need to display A in contact field and when enters B then need to display like A,B
So what is the logic in trigger code?
Thanks in Advance.
public List<AggregateResult> inBudgetList {get;set;}


inBudgetList = [SELECT  
                            Budget_User__r.Name inAEName,
                            Budget_User__c inAeId,
                            Advertiser__r.Name account, 
                            Sum(Amount__c) inBudAmt,
                            Broadcast_Month_Date__c effectiveDate
                            FROM Sales_Budget__c
                            WHERE Old_Budget_User__c = :selectedUserId
                            GROUP BY Budget_User__r.Name, Budget_User__c, Advertiser__r.Name, Broadcast_Month_Date__c
                            ORDER BY Budget_User__r.Name
                           ];







for(AggregateResult inBudItem: inBudgetList){
                
                transferObj.transferUser = (String)inBudItem.get('inAEName');	    			    		
                transferObj.account = (String)inBudItem.get('account');
                transferObj.transferIn = (Decimal)inBudItem.get('inBudAmt');
                transferObj.transferEffectiveDate = ((Datetime)inBudItem.get('effectiveDate')).format('MMMMM -YYYY');
                
                transferLogs.add(transferObj);
                transferObj = new transferLogsWrapper();

This is a part of my code containig aggregate result,please help me in covering this in a test class
Hi All,

I have implemented the Custom Breadcrumb in VF Page with Styles but I am getting the ERROR.

ERROR:
Error: Custom_Breadscrumb line 38, column 20: The reference to entity ":after" must end with the ';' delimiter	
Error	Error: The reference to entity ":after" must end with the ';' delimiter.

VF Page:
<apex:page >

<style type="text/css">
       $crumbs-back:#F3F5FA;
$text-color:#8093A7;


body {
    margin: 100px auto;
    font-family: Helvetica;
    background: #FFF;
}

#crumbs {
    text-align: center;
   
ul {
        list-style: none;
        display: inline-table;
        li {
            display: inline;
            
            a {
            display: block;
            float: left;
            height: 50px;
            background: #F3F5FA;
        
            text-align: center;
            padding: 30px 20px 0 60px;
            position: relative;
            margin: 0 10px 0 0; 
            
            font-size: 20px;
            text-decoration: none;
            color: $text-color;
        
            &:after {
                content: "";  
                border-top: 40px solid transparent;
                border-bottom: 40px solid transparent;
                border-left: 40px solid #F3F5FA;
                position: absolute; 
                right: -40px;
                top: 0;
                z-index: 1;
            }
            &:before {
                content: "";  
                border-top: 40px solid transparent;
                border-bottom: 40px solid transparent;
                border-left: 40px solid #fff;
                position: absolute; 
                left: 0; 
                top: 0;
            } 
            
        }
        }
    }
}




        
    
                #crumbs ul li:first-child a {
                    border-top-left-radius: 10px; border-bottom-left-radius: 10px;
                }
                #crumbs ul li:first-child a:before {
                    display: none; 
                }
                
                #crumbs ul li:last-child a {
                    padding-right: 40px;
                    border-top-right-radius: 10px; border-bottom-right-radius: 10px;
                }
                #crumbs ul li:last-child a:after {
                    display: none; 
                }
            
            #crumbs ul li a:hover {
                background: #357DFD;
        color:#fff;
            }
                #crumbs ul li a:hover:after {
                    border-left-color: #357DFD;
           color:#fff;
                }
        
    </style>
 <div id="crumbs">
  <h1>Breadcrumbs</h1>
    <ul>
        <li><a href="#1" ><i class="fa fa-home" aria-hidden="true"></i></a></li>
        <li><a href="#2" ><i class="fa fa-shopping-bag" aria-hidden="true"></i> Shop</a></li>
        <li><a href="#3" ><i class="fa fa-cart-plus" aria-hidden="true"></i> Cart</a></li>
        <li><a href="#4" ><i class="fa fa-credit-card-alt" aria-hidden="true"></i> Checkout</a></li>
        
    </ul>
</div>
</apex:page>

Adv Thanks,
VSK98
  • March 07, 2019
  • Like
  • 0
Hi,

I have account object when i enter A in Acc filed  i need to display A in contact field and when enters B then need to display like A,B
So what is the logic in trigger code?
Thanks in Advance.
Hi ,

This is my test class for insert a record

Parent Object :Album__c
Child object :Track__c(which has loopup relation with Album__C)

I have written the class and the test class for inserting a record in the child object...but both are giving me error....

In main program
----------------------

public class instrack 
{
track__c al = new track__c(); 
public track__c merch(String name,string name1)  
{
al.Name=name;                             
al.Album__c=name1;
insert al;                 
system.debug('the inserted record is:'+name);
return al;
}
}

Executed as :

instrack mc=new instrack();
mc.merch('Container','GullyBoy');

Error as: Method does not exist  or incorrect signature :void merch(string) from the type instrack....

Test class
-------------
@istest
public class instracktest
{
static testmethod void testmerch()
{
track__c al = new track__c(Name='Surgical'); 
 insert al;   
 Test.startTest();
         al = new track__c (Name = 'Surgical',Album__c='GullyBoy');
         Database.SaveResult result = Database.insert(al, false);
         System.assert(result.getErrors()[0].getMessage().contains('Track already exist with this'));
        Test.stopTest();              

}
}

Error as : System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Album__c]: [Album__c]

Kindly help out on the issue..Thanks in advance...
How do we access Custom Metadata Types through Visualforce? I couldn't find any relevant article that covers this to the point. I have a requirement, where I need to reference the custom MDT and populate variable values in the VF page based on the MDT value. Have read that we could use remote objects to do that. Any help on that would be appreciated.
PS: We are not using any custom controllers for this VF page.
  • March 06, 2019
  • Like
  • 0

Hello,

Did anyone else notice that the view state limit in Visualforce pages has been increased from 135 to 170 KB in the new release of Spring 2019