• Jainam Contractor
  • SMARTIE
  • 766 Points
  • Member since 2017

  • Chatter
    Feed
  • 24
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 140
    Replies
User Object has Records and Custom Object[Emp] has no records in it. User object has records in it, so we can't create a master detail relation.Created lookup relation, Then try to convert look up to master by clicking on change field type there is no master detail option to select.
emp Object has below fields.
User-added image
Guys, we have a survey page built from visualforce hosted on a force.com site that allows users to submit surveys, survey URL is included as a link in the final response template which is sent out on case closure.
In Salesforce, i created master-detail between Case and Survey object. Now my question is how to relate the submitted surveys to the case? Is this possible?
Hi Guys,

I just added the Survey Force to my org now. What I am wanting to know is how to link the survey created in Survey Force to be sent to my cases?

Can anybody advise?
Hi Guys,

I have created a formula field that shows me the difference between 2 date fields in word format (see screen shot below). We have identified an issue with the formula e.g. if  the Start Date = 1st March 2018 and the End Date = 29th April 2018 it records this as only 1 month which is incorrect for our business requirement. It needs to record this as 2 months. I have outlined the formula that I am currently using below along with a screen shot of the fields in question which shows an example of what I am referring too. Is anyone able to help me resolve this?

IF(   Lease_End_Date__c    >= DATE(YEAR( Lease_End_Date__c ), MONTH(   Lease_Start_Date__c   ), DAY( Lease_Start_Date__c )),
TEXT(YEAR( Lease_End_Date__c ) - YEAR( Lease_Start_Date__c )),
TEXT(YEAR( Lease_End_Date__c ) - YEAR( Lease_Start_Date__c ) - 1)) & " Years" &
IF(MONTH( Lease_End_Date__c ) = MONTH( Lease_Start_Date__c),
IF(DAY( Lease_End_Date__c ) >= DAY( Lease_Start_Date__c ), "", " & 11 Months"),
IF(MONTH( Lease_Start_Date__c ) > MONTH( Lease_End_Date__c ),
" & " & TEXT(12 - (MONTH( Lease_Start_Date__c ) - MONTH( Lease_End_Date__c ))) & " Months",
" & " & TEXT(MONTH( Lease_End_Date__c ) - MONTH( Lease_Start_Date__c )) & " Months"))

User-added image
  • March 05, 2018
  • Like
  • 0
The relation between Account and Opportunity is "Lookup", but still you are able to create roll up summary field on Account. Why?
Hi am facing below Error.
Logic needs to be implemented :If type is Contract Flow and Document Attached is True then HandOffAttached =True, otherwise False
I have one Designation  custom Object
created 3 fileds Type(picklist), document attached(checkbox) ,  Handoffattached(picklist)..
I have written below code:

trigger DesignationTrigger on Designation__c (after insert, before update) {
    // If type is Contract Flow and Document Attached is True then HandOffAttached =True, otherwise False
 
    for(Designation__c dc:Trigger.new)
    {
        if(dc.type__c=='ContractFlow' && dc.DocumentAttached__c==True)
        {
           dc.HandOffAttached__c='True';
        }
      else
          dc.HandOffAttached__c='True';
    }
  
}

I am getting the below error.  I am not sure whether i follwed correct approch or not for the gven logic .could any pleasae please guide me on this ? I really need your help in these triggers.
Apex trigger DesignationTrigger caused an unexpected exception, contact your administrator: DesignationTrigger: data changed by trigger for field HandoffAttached: bad value for restricted picklist field: True
Hi there,
I am working on a code  to sum up value in a custom field  'Total_Months_in_this_Position__c' of a custom object 
'TargetX_SRMb__Family_Relationship__c' and add the sum to a custom field 'Total_Months_Employed__c' of a related custom object 'TargetX_SRMb__Application__c'. 
One 'TargetX_SRMb__Application__c' can have multiple TargetX_SRMb__Family_Relationship__c. The relationship is a lookup.

Below is the code I wrote, I am having a hard time fixing the error on the last line.
Any help will be very much appreciated.


trigger CalcTotalMonths on TargetX_SRMb__Family_Relationship__c (After insert, After Update) {
    // gets a set of all application ids and application name with relationship
    Set<Id>applicationIds = new Set<Id>();   
    Map<Id,TargetX_SRMb__Application__c>appToUpdate =new Map<Id,TargetX_SRMb__Application__c>();
    Map<decimal,decimal>monthsWorked = new Map<decimal,decimal>();
    
    // collect the application ids of all new relationships with employer name
    if(trigger.isInsert){
    for (TargetX_SRMb__Family_Relationship__c Rel : Trigger.new)
    if(!string.isblank(Rel.TargetX_SRMb__Employer__c) && !string.isBlank(Rel.TargetX_SRMb__Contact__c)
      
      && (Rel.TargetX_SRMb__Relationship__c == 'Current Employer' || Rel.TargetX_SRMb__Relationship__c == 'Previous Employer'))
       
    {applicationIds.add(Rel.TargetX_SRMb__Application__c);
        }
        
        // collect the application ids of all updated relationships with employer name
      if(Trigger.isUpdate){
        
      for(TargetX_SRMb__Family_Relationship__c Rel : Trigger.new)
        {
     if((Trigger.oldMap.get(Rel.id).Total_Months_in_this_Position__c != Trigger.newMap.get(Rel.id).Total_Months_in_this_Position__c) 
      && !string.isBlank(Rel.TargetX_SRMb__Contact__c)
      && (Rel.TargetX_SRMb__Relationship__c == 'Current Employer' || Rel.TargetX_SRMb__Relationship__c == 'Previous Employer') )
            {
            Applicationids.add(Rel.TargetX_SRMb__Application__c); 
            }
        }
        
        //   Use aggregate query to get the total months worked for each relationship
          
          for(AggregateResult result :[Select Count(id) Total,SUM(Total_Months_in_this_Position__c) Months , TargetX_SRMb__Application__c FROM TargetX_SRMb__Family_Relationship__c
                WHERE TargetX_SRMb__Application__c IN :Applicationids GROUP BY TargetX_SRMb__Application__c               
                                      ])
          {  Decimal Months = (Decimal)result.get('Months');
             Decimal Total = (Decimal)result.get('Total');
           System.debug('Total Months Worked'+ 'Total_Months_in_this_Position__c' );
           Decimal field = monthsWorked.get(Months);
           if ( field != null)
               {
               TargetX_SRMb__Application__c app = appToUpdate.get((id)result.get('TargetX_SRMb__Application__c')); 
               app.Total_Months_Employed__c =  field;
               app.put(Total,field);
               }
          }

       
              }
      

}
}

Thanks,
Mariam
When attempting to create my Apex trigger for this Trailhead development exercise, I receive about 20 errors similar to Unexpected token '<'. , Unexpected token 'and'. etc.

trigger AccountAddressTrigger on Account (before insert, before update) {
  List<Account> acc = [Select id from account where Id in :trigger.new and BillingPostalCode!= null and Match_Billing_Address__c == true];
       for(Account a: acc)
    {
      a.ShippingPostalCode = a.BillingPostalCode;        
    }  
}

If i use below query there are no errors.
List<Account> acc = [Select id, Match_Billing_Address__c from account where Id in :trigger.new and BillingPostalCode!= null];

So, there is something wrong with the other Match_Billing_Address__c field and I validated that the API name is correct. I know there are other solutions available for same challenge but please help in debugging this.
 
Not sure if my syntax is correct, what I'm trying to achive is updating a text field (X80_20__c), where the data is coming from a formula text field (X80_20_Yes_or_No__c). The output from the formula field produces a Yes or No value.

This is the Apex trigger I attempted but its not populating the X80_20__c field. Any help would be appreciated or would a Apex Class be better to do in this situation? Also, I'm avoiding in using a workflow trigger or process builder for this.
 
trigger a8020 on Account (before insert,before update) {
    List obj = [SELECT Id,Name,X80_20_Yes_or_No__c,X80_20__c FROM Account WHERE
 (X80_20_Yes_or_No__c = 'Yes' OR X80_20_Yes_or_no__c = 'No') AND
 Outlet_Type__c = 'Home Depot' AND Has_1_2_3x5_DULO__c = 'Yes' ]; 

    for (Account a: obj) {
        string s = a.X80_20_Yes_or_No__c; 
        a.X80_20__c = s;  
    } 

    update obj; 
}

 

Hi developers,
I was wondering is it possible to prevent from deleting contact record if it has assets related to it? Success community says that trigger is an option. If trigger is the only option, could you help me with that?
Thanks a ton.

Hello! I can't seem to get the formula correct for an If, Then statement...

IF the Account's "Institution Type" (custom field) is a Bank or Commercial Bank, I want Calculation A to be used.
IF the Account's "Institution Type" is a Credit Union, I want Calculation B to be used.

Could anyone provide insight on how to write this? I get the basic jist, but everytime I "check syntax" something is always off. Thank you in advance!!
Hello, 

I have a formula number field where if both fields "Has_DULO_A__c" and "Has_DULO_B__c" have a Yes, output a 1. 

If both of those fields have a NO or Yes/No, output a 0.

How can I convert the 1 to be a YES and the 0 to be a NO, without creating a workflow trigger? Is it possible to create a new field that will hold the YES NO values, with just a formula field? If so, can someone help me figuring it out? 

thanks!
 
IF( 
AND( 
Has_DULO_A__c = "Yes", 
Has_DULO_B__c = "Yes" 
), 1, 0)

 
Hello, I need help in resolving the following formula.
IF(
AND(Month([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c)=3,Day([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c)=1),
DATE(YEAR([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c) + 1, Month([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c),Day([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c)-2),
DATE(YEAR([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c) + 1, Month([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c),Day([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c)-1)
)
As per the formula, if the month is 3 and day is 1, the formula fails to provide the result. Can someon help me achieve the logic where the result would be 1 day less than the field ([CLQ_Program_Transaction__c].CLQ_License_Start_Date__c) considering leap years as well?

TIA
Hi,

can someone explain me the below code. i am facing some difficulty in learning... the trigger is for geeting opportunity amount updated into Account

public class opportunityhandler
{
    public void opportunityamount(list<opportunity> newopportunity)
    {
        set<Id> setOppName=new set<Id>();
        List<Account> lstActs =new list<Account>();
        List<Opportunity> opps=new list<Opportunity>();
        for(opportunity opp:newopportunity)
        {
            setOppname.add(opp.Accountid);
        }
        
        list<Account> LstAccs= [select id,Name,Total_Opportunity_Amount__c,(select id, Amount from opportunities) from account where Id IN:setOppname];
        for(Account acc: lstAccs)
        { 
            double TotalAmount=0;
            for(Opportunity opp:acc.opportunities)
            {
                if(opp.Amount!=null)
                {  
                    totalAmount=TotalAmount+opp.Amount;
                }
            }  
            acc.Total_Opportunity_Amount__c=totalAmount;
            lstacts.add(acc);
        }
        update lstacts;
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
trigger duplicateemailcheck on Laptop__c (before insert, before update) {
    
           Laptop__c[] LaptopList1 = Trigger.new;
                 Set<id> Email = new Set<id>();
                     for(Laptop__c s : LaptopList1)
       {
           Email.add(s.Email__c);
       }      
       system.debug(LaptopList1);
       
       List <Laptop__C> duplicateLaptopList1 = new list <Laptop__C>();
       duplicateLaptopList1 = [Select id,Email__c from Laptop__c where Email__c IN :Email];
       system.debug(duplicateLaptopList1);
       
       Set<id> duplicateemail = new Set<id>();
       for(Laptop__c s : duplicateLaptoplist1)
       {
           duplicateemail.add(s.Email__c);
       }
       system.debug(duplicateemail);
       for(Laptop__c s : LaptopList1)
       {
               if(duplicateemail.contains(s.Email__c))
               {
                   s.Email__C.addError('Email already exist');
               }
       }
}
I'm trying to Create a summary field on an Object that counts the number of references for an applicant.  I created an object for candidates but I don't think it is a "master" do i have to create a summary lookup relationship for this to become a master object so that I can create a summary field??
User-added image
The scheduled job run everyday at 12 am.
String schExp = '0 0 0 * * ?';
Is it correct?
I have a field in which the user records a target date. I need a new field which takes that date entered by the user and shows a set number of days added to that date. Thanks for any help!
Hello Geeks,

We are developing a Custom Lightning Community with Guest user access. We have different Custom Community pages where we have placed Lightning Component. On the first page, we allow guest to select some products and when the guest user selects a product to view the details, we want to force him a Login on the Next page.

On the 1st page, we are storing the product information in the localStorage/ sessionStorage but when rendered to login page, i want to fetch the localStorage/ sessionStorage, but when i try to fetch that record it is showing 'null' even though there is a data in the localStorage/ sessionStorage.

Below are the code snippet, i am trying to store in/fetch from localStorage/ sessionStorage

Storing Data:
var GuestShoppingCart = [];
            //for(var i=0; i<items.length; i++) {
                GuestShoppingCart.push({
                    quantity : quantity,
                    product : component.get("v.product")
                });
            //}
            console.log(GuestShoppingCart);
            sessionStorage.setItem('localCartItems', JSON.stringify(GuestShoppingCart));
            localStorage.setItem('localCartItems', JSON.stringify(GuestShoppingCart));
        }
Fetching Data (In different component on another page):
var localCart = JSON.parse(localStorage.getItem('localCartItems'));
But the later statement throws null. And I want to use that value to store in the Salesforce CRM custom object.

Can anyone point me where i am making an error. Any help is appreciated.

Thanks,
Jainam Contractor,
Salesforce Developer,
Varasi LLC
Hello Geeks,

We want to integrate the Apprise ERP system with our Salesforce CRM org. Can you please let me know if any connector is available or some developer API docs exposed by Apprise for Salesforce integration. ?

Any help appreciated. If any connector is available, that will be most preferred.

Thanks in advance.
Jainam Contractor
Hello Geeks,

I have built a custom lightning component and deployed the same on the Lightning Community (Napili template). I have set the public access to Community but the guest user is not able to view/ access the Lightning Component. I have set the access="global" for all the lightning component. 

Also, I have set the required Object Settings for Custom/ Standard Object for the Guest Profile.

What am i missing..???

Any help is appreciated..

Thanks,
Jainam Contractor
Hello guys

I am having one scenario, while creating contact, I will be checking the email id of contact and if duplicate email id found for specific account it relates then I have a Checkbox__c field on account and it should be unchecked.
by default Vheckbox__c will be checked.
While creating contact for a particular account,if email is already found on that particular account then checkbox should be unchecked
Lets Say I have account A1 and have Checkbox__c field checked by default.
Now I will add contacts for the account A1. I am adding first contact C1 with email xyz@gmail.com and I will add another contact C2 with same email id xyz@gmail.com, since two contacts have same email id then Checkbox__c should get unchecked and I will update contact C2 with email abc@gmail.com and now two contacs have different email ids the Checkbox__c should get checked.

If I get any help then it will be really helpful.
Hello All,


I have created a Prodct rule in salesforce CPQ. Criteria is when the 'CAD-CLIENT-FT' or 'CAD-CLIENT PT' products is selected while creating quote
'CAD-SERVERSW' must be included on the quote.
I have created below rule to fulfill the requirement:
1.Product Rule
Product Rule

2. Product Action
Product Action

3. Product Configuration:
Product Configuration

Letter on I am creating Quote with the mentioned two products but the product is not getting added to the Quote even meets the criteria
My rule is not triggering. Can anybody help in this if missing something.

Welcome to your suggestions!

Thanks
Nilesh
Hello Geeks,

We are developing a Custom Lightning Community with Guest user access. We have different Custom Community pages where we have placed Lightning Component. On the first page, we allow guest to select some products and when the guest user selects a product to view the details, we want to force him a Login on the Next page.

On the 1st page, we are storing the product information in the localStorage/ sessionStorage but when rendered to login page, i want to fetch the localStorage/ sessionStorage, but when i try to fetch that record it is showing 'null' even though there is a data in the localStorage/ sessionStorage.

Below are the code snippet, i am trying to store in/fetch from localStorage/ sessionStorage

Storing Data:
var GuestShoppingCart = [];
            //for(var i=0; i<items.length; i++) {
                GuestShoppingCart.push({
                    quantity : quantity,
                    product : component.get("v.product")
                });
            //}
            console.log(GuestShoppingCart);
            sessionStorage.setItem('localCartItems', JSON.stringify(GuestShoppingCart));
            localStorage.setItem('localCartItems', JSON.stringify(GuestShoppingCart));
        }
Fetching Data (In different component on another page):
var localCart = JSON.parse(localStorage.getItem('localCartItems'));
But the later statement throws null. And I want to use that value to store in the Salesforce CRM custom object.

Can anyone point me where i am making an error. Any help is appreciated.

Thanks,
Jainam Contractor,
Salesforce Developer,
Varasi LLC
Hello Geeks,

I have built a custom lightning component and deployed the same on the Lightning Community (Napili template). I have set the public access to Community but the guest user is not able to view/ access the Lightning Component. I have set the access="global" for all the lightning component. 

Also, I have set the required Object Settings for Custom/ Standard Object for the Guest Profile.

What am i missing..???

Any help is appreciated..

Thanks,
Jainam Contractor
User Object has Records and Custom Object[Emp] has no records in it. User object has records in it, so we can't create a master detail relation.Created lookup relation, Then try to convert look up to master by clicking on change field type there is no master detail option to select.
emp Object has below fields.
User-added image
Hi All,

I have a requirement where I need a field to be manual entry for some set of users. In the existing functioanlty the field is Auto populate through Apex calculation. Any suggestions appreciated.

Thanks in Advance.
  • March 19, 2018
  • Like
  • 0
I'm trying to copy the attachments from Contact to the Opportunity after Conversion from a Lead - Below is the code, which works only if I manually update the new Account converted from Lead  :

trigger Copy_Attachments_Accts_to_Oppr on Account (after insert,after update) {

    //if (trigger.isAfter && trigger.isInsert) {
        List<Attachment> attachmentsToInsert = new List<Attachment>();
        //List<Attachment> attachmentsToDelete = new List<Attachment>();
        for (Account acc : Trigger.New) { 
        
               System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Account Id->'+ acc.id);
               System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Account Parent Lead Id->'+ acc.Account_ID__c);      
            
               List<Opportunity> opprs = [select Id from Opportunity where Account.Id = :acc.id ]; 
               List<Contact> conts = [select Id from Contact where Account.Id = :acc.id ];   
               List<Attachment> accountAttachmentLst = new List<Attachment>();  
               
               for(Contact contact : conts ){
                   accountAttachmentLst.addAll([select name, body, parentid from Attachment where PARENTID = :contact.id]);
                   
               }
                
               System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Opportunities ->'+opprs );
               System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Contact Attachment List ->'+accountAttachmentLst );       
          
                for (Attachment a : accountAttachmentLst ) {
                   
                    System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Attachment ->'+a.name);
                    System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: Attachment ->'+a.parentid);
                    
                    for(Opportunity opr : opprs ){
                       Attachment att = new Attachment(name = a.name, body = a.body, parentid = opr.id); 
                       System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: attachments.name ->'+att.name );
                       System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: attachments.parentid ->'+att.parentid);
                       
                       attachmentsToInsert.add(att);
                       
                    }
                    
                    //Attachment att = new Attachment(name = a.name, body = a.body, parentid = acc.id); 
                   // attachmentsToDelete.add(att);
                }
            
        }
        
        System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: attachmentsToInsert->'+attachmentsToInsert); 
        //System.debug('DEBUG: Copy_Attachments_Accts_to_Oppr:: attachmentsToDelete'+attachmentsToDelete); 
        
        
         if (attachmentsToInsert.size() > 0) {
             insert attachmentsToInsert;
         }

         // Minimize storage requirements by cleaning up attachments
         /*if (attachmentsToDelete.size() > 0) {
             delete attachmentsToDelete;
         }*/
   // }

Any suggestions to circumvent this problem will be much appreciated.

Regards,

Debendra
Hi All,

I have opportunity and opportunity line item. There is a field on opprtunity with comma seprated values of op[portunity line item numbers. My requirement is when I delete opportunity line item record form opp record the field in opportunity object should get updated. I want to do it with configuration. Kindly provide me solution.

Thanks
Anuj
I created a trigger that work very except that I got this error when I try to use addError.
Here is my trigger: 
trigger MyTestTrigger on Pret__c (before insert) {
   
       Set<Id> livreNew = new Set<Id>{};
       Set<Id> contactNew = new Set<Id>{};
        for(Pret__c p: Trigger.new){
          
              livreNew.add(p.Livre__c);
              contactNew.add(p.Contact__c);
        }

       
        List<Pret__c> relatedPrets = [SELECT Id, Contact__c, Livre__c FROM Pret__c
        WHERE Livre__c IN :livreNew AND Contact__c IN :contactNew];
        system.debug('relatedPrets '+relatedPrets);
        
            if(!relatedPrets.isEmpty()){
               for(Pret__c p: relatedPrets){
                system.debug('Trigger p.Id '+p.Id);
                Trigger.oldMap.get(p.Id).addError('Error - dupe item');
                }
            }
}
Pret__c is a junction object between Livre__c and Contact__c
Where I'm wrong ? please help :(
Hi All,

I have a code written where the fields are created or updated. I need to add a condition for iscreatable so that my code is secure. Below is my code
 
global class Async{
@future

public static void sendEmail(Set<Id> sendList){
List <Notes__c> notesList = new List<Notes__c>();
notesList.clear();
for(List<EmailMessage> emailmsglist:[select Id,parentId,Parent.Email__c,Parent.Contact.Email,ToAddress, FromAddress, Subject, TextBody, HTMLBody, CreatedDate from EmailMessage where id in :sendList] )
{
        for(EmailMessage emlist :emailmsglist){

             Notes__c note= new Notes__c(); // Create a note object 
             note.Case__c= emlist.parentid;
                 IF (emlist.HTMLBody != NULL && emlist.HTMLBody != ''){
                 note.Message__c = emlist.HTMLBody;
                 }
                 else {
                 note.Message__c = emlist.TextBody;
                 }    
             note.Sent_To__c = emlist.ToAddress;
             note.From__c = emlist.FromAddress;
             note.Subject__c = emlist.Subject;
             note.Datetime_Created__c = emlist.CreatedDate;
             if (emlist.Parent.Contact.Email == emlist.ToAddress || emlist.Parent.Email__c == emlist.ToAddress) .
             {
             note.Type__c = 'Response';
             }
             else {
             note.Type__c = 'Forward/Others';
             }
             notesList.add(note); // Add note object to the list
         }
}

if(notesList.size()>0) {
       insert notesList;
       }
}
}

Wherever the field is assigned to a value or record is created or updated I want to apply iscreatable and isupdateble conditions. Kindly provide me solution for this.

Thanks,
Anuj
Hi, there are many posts showing how to create formula fields for images and refer to the image in the Documents tab. In Lightning we have Files tab and not Documents tab. How do you get the image URL?
    
    global Database.QueryLocator start(Database.BatchableContext BC){
        
        query = 'select id,Name,enquiry_For__c,email,Contact__c,ownerId,CCEmail__c from Lead'+
                'where enquiry_For__c = \'MCA Email Campaign\' AND (X3rdDayOfIncorporation__c =: todayDate OR X5th_Day_of_Incorporation__c =: todayDate'+
                'OR X7th_Day_of_Incorporation__c =: todayDate OR X10th_Day_of_Incorporation__c =: todayDate OR X15th_Day_of_Incorporation__c =: todayDate'+
                'OR X20th_Day_of_Incorporation__c =: todayDate OR X30th_Day_of_Incorporation__c =: todayDate OR X35th_Day_of_Incorporation__c =: todayDate'+
                'OR X45th_Day_of_Incorporation__c =: todayDate OR X50th_Day_of_Incorporation__c =: todayDate OR X60th_Day_of_Incorporation__c =: todayDate'+
                'OR X75th_Day_of_Incorporation__c =: todayDate OR X85th_Day_of_Incorporation__c =: todayDate OR X100th_Day_of_Incorporation__c =: todayDate'+
                'OR X120th_Day_of_Incorporation__c =: todayDate OR X130th_Day_of_Incorporation__c =: todayDate OR X150th_Day_of_Incorporation__c =: todayDate'+
                'OR X180th_Day_of_Incorporation__c =: todayDate)';
                
                system.debug('--query--' +query);
                
                return Database.getQueryLocator(query);
    }
 
  • March 12, 2018
  • Like
  • 0
Challenge Not yet complete... here's what's wrong: 
Could not find an Opportunity Line Item for the 'Edge Installation' opportunity with the 'GenWatt Diesel 1000kW' product, quantity of 1 and price of 98,000.User-added imageUser-added image
Guys, we have a survey page built from visualforce hosted on a force.com site that allows users to submit surveys, survey URL is included as a link in the final response template which is sent out on case closure.
In Salesforce, i created master-detail between Case and Survey object. Now my question is how to relate the submitted surveys to the case? Is this possible?

Hi developers,
I was wondering is it possible to prevent from deleting contact record if it has assets related to it? Success community says that trigger is an option. If trigger is the only option, could you help me with that?
Thanks a ton.