• Kalpana Dhanajayaraj
  • NEWBIE
  • 35 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 7
    Replies
The objects Campaign line item is in a look up relationship with Campaign object.
I want to display the fields  from Campaign line item in Campign list view.
How to achieve this?
I have created a dynamic dashboard. We have created an application used by users of two different countries. Same records are visible to both country users. There is no difference in record count. Users of country A should not see  records of country B in report and Dashboard. 

Filtered By:1 AND 2 AND (3 OR 4)   Edit 
   1.Program Plan: Record Type equals Level - 1 
   2. Geography Name not equal to  
   3. Country Code equals CAN
   4. Country Code equals  MEX
 
I dont want the users of 2 countries to see each others records. Indian users should not have access to Pilippine's campaign records,
Campaign access is set to Public Read/Write. 
Both India and Philippines uses same Campaign record type.
In the campaigns child object there are few record types which is specific to India.
How to achieve this?
There are 2 external objects Coupons and Events.I want the Event Type field in Event object to be displayed in Coupon object.I have established this using external lookup relationship and the field Event Type is displayed in Coupon record.
This is in sandbox.
Now should I create any mapping in heroku so that Event Type field in Coupon will hold the data from Event object(field name Event Type)
Requirement : When Sales Channel = Partner, the Primary Agency field should contain a partner of type "Agency TS" or "RPO"

AND( 

NOT( $Profile.Id = $Label.Profile_Sys_Admin_3rd_Party), 
NOT( $Profile.Id = $Label.Profile_Sys_Admin_No_Cust), 
OR 
($RecordType.Id = $Label.RT_CorpSolutions, 
$RecordType.Id = $Label.RT_CorpSolutions_Renewal ), 
ISPICKVAL( Sales_Channel__c , "Partner") , 
OR( 
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'Agency TS')), 
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'RPO'))) 
)

I want the Validation Rule  to fire only when both of the mulstiselect picklist value is not present.
Now it is firing even when one value is present.Record is getting saved when only both RPO and Agency TS are added.
Also i am not able to inlcude other values also.
How to get this corrected

    
    webservice static String CreateBridgeRenewal(Id opportunityId, Integer ContractTerms) 
    { 
        String retString = '';
        Savepoint sp = Database.setSavepoint();
        try
        {
            Opportunity originOpportunity = [select Name,Business_Unit__c,Contract_Start_Date__c, Originating_Opportunity__r.id, Account.Name,LCSA_ID__c,Pricebook2Id,
                                             CurrencyIsoCode,Payment_Method__c,Payment_Period__c, Renew_Target_Close_Date__c, 
                                            (select id,description,UnitPrice,PricebookEntryid,Quantity,
                                            PricebookEntry.IsActive,PricebookEntry.Name from OpportunityLineItems order by SortOrder)  
                                            from Opportunity  
                                            where id=:opportunityId limit 1];
                                            
            String recordTypeId = (originOpportunity.Business_Unit__c == 'LSS') ? Label.RT_Sales_Solutions : Label.RT_CorpSolutions;
            String type = (originOpportunity.Business_Unit__c == 'LSS') ? 'Adjustment' : 'Bridge Renewal'; 
            String stage = (originOpportunity.Business_Unit__c == 'LSS') ? 'Introduction' : 'Engaged';            
            String subtype = (originOpportunity.Business_Unit__c == 'LSS') ? 'Bridge Renewal' : '';    
                                         
                        Opportunity BridgeRenewal = new Opportunity(Type = type,  
                                                        RecordTypeId = recordTypeId, 
                                                        StageName = stage,
                                                        Contract_Term_Months__c = ContractTerms, 
                                                        Sales_Channel__c = 'Direct', 
                                                        OwnerId = UserInfo.getUserId(),
                                                        ForecastCategoryName = 'Omitted', 
                                                        closeDate= originOpportunity.Renew_Target_Close_Date__c, //Case-01845278: Set Close Date of the Bridge renewal to be the Renewal Target Close Date of Originating Opportunity
                                                        AccountId = originOpportunity.AccountId,
                                                        //Per Case 03372446: Change Originating_Opportunity__c of Bridge Renewal 
                                                            //Originating_Opportunity__c = opportunityId,
                                                        Originating_Opportunity__c = originOpportunity.Originating_Opportunity__r.id,
                                                        Renewal_Opportunity__c = opportunityId,
                                                        Contract_Start_Date__c = originOpportunity.Contract_Start_Date__c,
                                                        LCSA_ID__c = originOpportunity.LCSA_ID__c,
                                                        Pricebook2Id = originOpportunity.Pricebook2Id,
                                                        CurrencyIsoCode = originOpportunity.CurrencyIsoCode,                            
                                                        Description = 'Bridge Renewal Opportunity',
                                                        Approval_Status__c = 'Renewal Bridge - New',
                                                        Sub_Type__c = subtype,
                                                        nextstep = 'Bridge Renewal Opportunity Approval',
                                                        Renew_Target_Close_Date__c= originOpportunity.Renew_Target_Close_Date__c, 
                                                        Name = originOpportunity.Account.Name + '- BridgeRenewal -Original RTCD ' + datetime.newInstance(originOpportunity.Contract_Start_Date__c, time.newInstance(0, 0, 0, 0)).format('MM/dd/yyyy'),
                                                        Exclude_Xactly__c = true);
            
     
            BridgeRenewal.Name = originOpportunity.Account.Name + '- BridgeRenewal';
            if(originOpportunity.Contract_Start_Date__c!=null || originOpportunity.Renew_Target_Close_Date__c!=null)
            {
                BridgeRenewal.Name += ' -Original RTCD ' + datetime.newInstance(originOpportunity.Contract_Start_Date__c!=null?originOpportunity.Contract_Start_Date__c:originOpportunity.Renew_Target_Close_Date__c, time.newInstance(0, 0, 0, 0)).format('MM/dd/yyyy');
                BridgeRenewal.Contract_End_Date__c = (originOpportunity.Contract_Start_Date__c!=null?originOpportunity.Contract_Start_Date__c:originOpportunity.Renew_Target_Close_Date__c).addMonths(ContractTerms).addDays(-1);
            }
            if(originOpportunity.Business_Unit__c == 'LSS')
            {
                BridgeRenewal.Payment_Method__c = originOpportunity.Payment_Method__c;
                BridgeRenewal.Payment_Period__c = originOpportunity.Payment_Period__c;
            }
                                                                    
        
            Integer thisYear = System.today().year() ;

            if(BridgeRenewal.Contract_Start_Date__c != null && Integer.valueOf(BridgeRenewal.Contract_Start_Date__c.year()) == thisYear
                && BridgeRenewal.Contract_End_Date__c != null &&  Integer.valueOf(BridgeRenewal.Contract_End_Date__c.year()) > thisYear){
                BridgeRenewal.Exclude_Xactly__c = false;
            }else{
                BridgeRenewal.Exclude_Xactly__c = true;
            }
            
            if(BridgeRenewal.closeDate == null) BridgeRenewal.closeDate = system.today();
            
                                                      
            insert BridgeRenewal;
            retString = BridgeRenewal.id;
            /*Create Opportunity line items START*/
            List<OpportunityLineItem> items = new List<OpportunityLineItem>();
            for (OpportunityLineItem oli : originOpportunity.OpportunityLineItems) 
            {
                if(oli.PricebookEntry.IsActive)
                {
                    OpportunityLineItem newOLI = oli.clone(false);//new OpportunityLineItem();
                    newOLI.OpportunityId = BridgeRenewal.Id;
                    items.add(newOLI);
                }
            }
            String[]  insertErrors = GeneralUtil.insertRecords(items, 'OpportunityUtil', 'CreateBridgeRenewal-' + opportunityId, 'High');
          
            
        } catch (Exception e){
            Database.rollback(sp);
            ExceptionLogUtil.logException(UserInfo.getUserId(), 'OpportunityUtil', 'CreateBridgeRenewal', new List<String>{''+e+' - ' + opportunityId + ContractTerms}, 'High');
            retString = 'There was an error creating BridgeRenewal. Please contact System Administrator. ERROR: ' + e;
        }
        System.debug(LoggingLevel.Error,'CreateBridgeRenewal() retString =>' + retString);                                       
        return retString;
    }


Getting error in th eline : Name = originOpportunity.Account.Name + '- BridgeRenewal -Original RTCD ' + datetime.newInstance(originOpportunity.Contract_Start_Date__c, time.newInstance(0, 0, 0, 0)).format('MM/dd/yyyy'),

Name is the API name.
how to get rid of this error
Rule : AND 

$User.OverrideWorkflow__c ="False", 
OR( 
$RecordType.Id=$Label.RT_AccountVerified, 
$RecordType.Id=$Label.RT_Account_Inactive 
), 
OR( 
TODAY() > LSS_Hold_Over_Expiration__c , 
TODAY() > Hold_Over_Expiration__c ) 

)


Email Alert : 
 
Additional Emails : countersignature@i-2jeq07id3t2l6m943drrgkf18h7xmyzrwj97w27hc3kg4mfzi.j-373fumaq.cs10.apex.sandbox.salesforce.com
Order Billing City/State/Province/Zip Code:<apex:outputText value="relatedTo.Renewal_Opportunity__r.Order_Billing_City__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_State_Province__c+ ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Zip_Code__c"></apex:outputText> <br/> 
I want to concatenate the above fields and display.
But its not working.
Any assistance will be of great help
 
I need to Display MISSING if both or one of the field is empty(address line1 address line 2)
If both hold values concatenate both and display.

Order Billing address : <apex:outputText value="{"!IF(AND(NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c)),
                 NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c))),
                !relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Address_2__c ,'MISSING') }">
</apex:outputText>

this is not working .Any help would be great
The above code is not working .there is no error.
Public static void validateCase(List<case> cases){
     for(Case c: cases){
      if((c.recordTypeid == Label.RT_Deal_Support && c.Type == 'Insight Tag Implementation') && (String.isBlank(c.contact.Name) || c.Top_Level_Domain__c == null))
         {
            c.addError('Top-Level Domain and Contact Name are required when Record type = Deal Support and Type = Insight Tag Implementation');
         }
       }
    }


 calling the above method via trigger 
trigger CaseTrigger on Case (before insert, before update, after insert, after update, after delete, after undelete) {
    if(GeneralUtil.triggerOverrideCheck('CaseTrigger')){
        if(Trigger.isBefore){
            CaseUtil.validateCase(Trigger.new);


I created a case of record type 'Deal Support'  and Type = Insight Tag Implementation.
And did not enter value for Contact name and Top-level domain.
But the error was not thrown.


 
Method :  public static void validateCase(Case[] cases){
     for(Case c: cases){
      if((c.recordTypeid == Label.RT_Deal_Support && c.Type == 'Insight Tag Implementation') && (String.isBlank(c.contact.Name) || c.Top_Level_Domain__c == null))
         {
            c.addError('Top-Level Domain and Contact Name are required when Record type = Deal Support and Type = Insight Tag Implementation');
         }
       }
    }


On calling the above method via trigger 
trigger CaseTrigger on Case (before insert, before update, after insert, after update, after delete, after undelete) {
    if(GeneralUtil.triggerOverrideCheck('CaseTrigger')){
        if(Trigger.isBefore){
            CaseUtil.validateCase(Trigger.new);

Getting the error Method does not exist or incorrect signature: CaseUtil.validateCase(List<Case>)

Method is defined in caseutil class
The objects Campaign line item is in a look up relationship with Campaign object.
I want to display the fields  from Campaign line item in Campign list view.
How to achieve this?
There are 2 external objects Coupons and Events.I want the Event Type field in Event object to be displayed in Coupon object.I have established this using external lookup relationship and the field Event Type is displayed in Coupon record.
This is in sandbox.
Now should I create any mapping in heroku so that Event Type field in Coupon will hold the data from Event object(field name Event Type)
Requirement : When Sales Channel = Partner, the Primary Agency field should contain a partner of type "Agency TS" or "RPO"

AND( 

NOT( $Profile.Id = $Label.Profile_Sys_Admin_3rd_Party), 
NOT( $Profile.Id = $Label.Profile_Sys_Admin_No_Cust), 
OR 
($RecordType.Id = $Label.RT_CorpSolutions, 
$RecordType.Id = $Label.RT_CorpSolutions_Renewal ), 
ISPICKVAL( Sales_Channel__c , "Partner") , 
OR( 
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'Agency TS')), 
NOT(INCLUDES(PrimaryAgency__r.Relationship_Type__c, 'RPO'))) 
)

I want the Validation Rule  to fire only when both of the mulstiselect picklist value is not present.
Now it is firing even when one value is present.Record is getting saved when only both RPO and Agency TS are added.
Also i am not able to inlcude other values also.
How to get this corrected
Rule : AND 

$User.OverrideWorkflow__c ="False", 
OR( 
$RecordType.Id=$Label.RT_AccountVerified, 
$RecordType.Id=$Label.RT_Account_Inactive 
), 
OR( 
TODAY() > LSS_Hold_Over_Expiration__c , 
TODAY() > Hold_Over_Expiration__c ) 

)


Email Alert : 
 
Additional Emails : countersignature@i-2jeq07id3t2l6m943drrgkf18h7xmyzrwj97w27hc3kg4mfzi.j-373fumaq.cs10.apex.sandbox.salesforce.com
I need to Display MISSING if both or one of the field is empty(address line1 address line 2)
If both hold values concatenate both and display.

Order Billing address : <apex:outputText value="{"!IF(AND(NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c)),
                 NOT(ISBLANK(relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c))),
                !relatedTo.Renewal_Opportunity__r.Order_Billing_Address_1__c + ' ' +relatedTo.Renewal_Opportunity__r.Order_Billing_Address_2__c ,'MISSING') }">
</apex:outputText>

this is not working .Any help would be great
The above code is not working .there is no error.
Method :  public static void validateCase(Case[] cases){
     for(Case c: cases){
      if((c.recordTypeid == Label.RT_Deal_Support && c.Type == 'Insight Tag Implementation') && (String.isBlank(c.contact.Name) || c.Top_Level_Domain__c == null))
         {
            c.addError('Top-Level Domain and Contact Name are required when Record type = Deal Support and Type = Insight Tag Implementation');
         }
       }
    }


On calling the above method via trigger 
trigger CaseTrigger on Case (before insert, before update, after insert, after update, after delete, after undelete) {
    if(GeneralUtil.triggerOverrideCheck('CaseTrigger')){
        if(Trigger.isBefore){
            CaseUtil.validateCase(Trigger.new);

Getting the error Method does not exist or incorrect signature: CaseUtil.validateCase(List<Case>)

Method is defined in caseutil class