• Jolly_Birdi
  • NEWBIE
  • 397 Points
  • Member since 2018

  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 76
    Replies
Hello,

i need to return a list of Campaigns which fullfill following requirement

WHERE Campaign.StartDate <= Today AND Campaign.EndDate + 7Days > Today

How can i do this in SOQL?

Thanks
Peter
Hi All,
I need help in writing test class for trigger. I have written but its giving only 65%. Please help me.
trigger test1 on obj1__c (after insert, after update)
{
if(trigger.isAfter&& (trigger.isinsert || trigger.isUpdate))
{
    test3.method1(Trigger.New);
}
}
 
public class test3
{
    public static void method1(List<Obj1__c> o1)
    {
        map<string, obj1__c> ObjMap = new map<string, obj1__c>();
    
    for(obj1__c obj: o1)
    {
        if (obj.Shared_Field__c != Null)
        {
            ObjMap.put(obj.Shared_Field__c, obj);
        }
    }
    
    List<obj2__c> obj2l = [SELECT Id, Shared_Field__c, F1__c,f2__c 
                        FROM obj2__c WHERE Shared_Field__c IN :ObjMap.KeySet()];
    List<obj2__c> obj2list = new List<obj2__c>();
    
    for(obj2__c c: obj2l)
    {
        obj1__c obj = ObjMap.get(c.Shared_Field__c);
        c.f1__c = obj.f1__c;
        c.f2__c = obj.f2__c;
        
        obj2list.add(c);
    }
    
    if(obj2list.size() > 0)
    {
        update obj2list;
    }
    }
    
}

Thanks in Advance

 
Hi,
Below is my simple Trigger on two custom objects with MD relationship,
For Name I am getting Id, where as for Property__c I am getting correct Value.
below is my trigger
trigger CreateNewRecord on Deal__c (after insert, after update) 
    {
    set<id> triggerIds = trigger.newMap.keyset();
	List <Project__c> Project = [select id, Name, Deal__r.Property__r.Name from Project__c where id in :triggerIds];
    for(Deal__c deal : Trigger.new)
    {
        if( deal.Type__c == 'New' ) 
            
            Project.add(new Project__c
                              (
								Name = deal.Property__r.Name, // this field is giving ID instead of Name
								Property__c = deal.Property__c // This field is giving correct update.
                              )
                        );
    }
        insert Project;
    }

 
  • November 12, 2018
  • Like
  • 0
Hello
 
So, we are able to do something like this
Map<String, AggregateResult> aggregations =  new Map<String, AggregateResult> ([SELECT  Status Id, COUNT(Id)QTY FROM Case GROUP BY Status   ]);
But is there any options to do the same with at least 2 aggregated and  grouped fields?
I mean something like the following
Map<String, Map<String,AggregateResult>> aggregations =  new Map<String, Map<String, AggregateResult>> ([SELECT  Status Id, Department__c dId, COUNT(Id)QTY FROM Case GROUP BYStatus, Department__c  ]);
And if not, is the manually written parser the only solution?

Have a nice day!
Hello,

I need to write a trigger to update the value of Related to company field ( if it is null only) on the task object based on the related to contact field value. Please help me how can I achieve this.

Thanks, Shweta
I need help. I have created a formula field - using case, it's working for every subject except for the subject "About Enterprise Florida"; if this subject is choosen the formula field I created returns a blank. See below. I originally was trying to use includes but kept running into syntax errors.

CASE( Subject__c , "Career Opportunities with Enterprise Florida", "Administration - Human Resources", 
CASE( Subject__c , "Vendor Inquiry", "Administration - Human Resources", 
CASE( Subject__c , "Sports", "Administration - Salesforce", 
CASE( Subject__c , "Data & Statistics", "Business Development", 
CASE( Subject__c , "Expand an Established Florida Business", "Business Development", 
CASE( Subject__c , "Florida Industry Information", "Business Development", 
CASE( Subject__c , "Foreign Direct Investment (FDI)", "Business Development", 
CASE( Subject__c , "Incentives", "Business Development", 
CASE( Subject__c , "Locate a Business to Florida", "Business Development", 
CASE( Subject__c , "Minority and Small Business Financing", "Business Development", 
CASE( Subject__c , "Rural Florida", "Business Development", 
CASE( Subject__c , "Small Business Assistance", "Business Development", 
CASE( Subject__c , "About Enterprise Florida - EFI Investor Relations", "External Affairs", 
CASE( Subject__c , "About Enterprise Florida - EFI Partner / Stakeholder", "External Affairs", 
CASE( Subject__c , "About Enterprise Florida - General Questions", "External Affairs", 
CASE( Subject__c , "Stakeholder Council Membership", "External Affairs", 
CASE( Subject__c , "Africa Trade Expansion Program", "International Trade & Development", 
CASE( Subject__c , "Export and Trade Assistance", "International Trade & Development", 
CASE( Subject__c , "Trade Show Information", "International Trade & Development", 
CASE( Subject__c , "About Enterprise Florida - EFI Leadership", "Marketing & Communications", 
CASE( Subject__c , "About Enterprise Florida - Press Inquiry", "Marketing & Communications", 
CASE( Subject__c , "About Enterprise Florida - Public Records Request", "Marketing & Communications", 
CASE( Subject__c , "Buildings & Sites / GIS", "Marketing & Communications", 
CASE( Subject__c , "Marketing Inquiry", "Marketing & Communications", 
CASE( Subject__c , "Sponsorship Opportunity", "Marketing & Communications", 
CASE( Subject__c , "Subscriptions & Newsletters", "Marketing & Communications", 
CASE( Subject__c , "Website/Tech Support", "Marketing & Communications", 
CASE( Subject__c , "Florida Defense Alliance & FDSTF", "Military & Defense", 
CASE( Subject__c , "International Offices - Enterprise Florida", "International Offices", 
NULL)))))))))))))))))))))))))))))


 
Hey guys,

I appreciate all the help I can get,

Here's my formula :

IF(ISBLANK(IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)))))),IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4))))),GAI)

And here's the error:  Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2

I know it's very close, I just can't figure out where the error's coming from.

Thanks!

 
Hi exports. I encountered this error and have trouble with performance tuning.

I tried asyncronous approach, but Apex CPU time limit exceeded occurs continuously.
Anybody can make it more efficient?

Here is code and size of each Lists from static method is about 15,000.
Please help.
 
static List<Schedule__c> getScheduleList(){
		return [SELECT ID, Opportunity__c, StartTime__c FROM Schedule__c WHERE Result__c = 'Success' ORDER BY Opportunity__c];
	}

	global Database.QueryLocator start(Database.BatchableContext BC) {
		query = 'SELECT ID FROM CASE';
		return Database.getQueryLocator(query);
	}

   	global void execute(Database.BatchableContext BC, List<sObject> scope) {
   		List<Opportunity> allopps = getOppList();
   		List<Schedule__c> schedules = getScheduleList();

		List<Schedule__c> filtered = new List<Schedule__c>();
        Datetime dt;
        Boolean check;
        Boolean status;

        for ( Opportunity opp : allopps ){
       		dt = null;
 			check = false;
 			status = false;
       		for (Schedule__c schedule : schedules ){	
   				if( check == false && status == true )
   					break;

   				if( schedule.Opportunity__c == opp.id ){
   					check = true;
       				filtered.add(schedule);
       				if( dt == null || schedule.StartTime__c < dt)
       					dt = schedule.StartTime__c;

       				i++;
       			}
       			else if( check == true && status == false){
       				check = false;
       				status = true;
       			}
       		}

       		if( filtered.size() >= 1){
       			opp.SuccessDate__c = dt;
       			opp.StageName = 'Success';
       		}
       		else if( filtered.size() == 0 && opp.StageName == 'Success'){
				opp.SuccessDate__c = null;
				opp.StageName = 'Initial Stage';
       		}
        }

        System.debug('schedule size : ' + schedules.size());
        System.debug('size : ' + allopps.size() + ' count : ' + i);
        /*
		try{
			update allopps;
        }catch( Exception e){
       		System.debug('Error : ' + e.getMessage());
        }
        */
	}

Thanks in advance.
Hello,

I have a problem regarding a relationship relationship fields on my salesforces organization.

Let me explain, we have created an ambassador program, I need to know who is the ambassador of my opportunity.
I create a field: Ambassador__c of type Reference (Account).

The problem is I want to return the account id in this field
Account ID: 0015800000nv9a8 and not the account name, how should I proceed?

Thank you in advance for your answers.
 
I have to start a salesforce project for my client who are an Insurance provider company (agents).
I have read about the things which suggest to go with the Financial Services Cloud. I have read its basics and workings on trailhead.
On the other hand when we go with the Insurance module then it shows the different screens, Objects and relations. You can check it in the below provided link.
(https://www.salesforce.com/in/solutions/industries/financial-services/insurance/?d=7010M000001y6x7)

The things which we want to know are as follows:
- Which cloud we need to use for the Insurance App.
- If it is financial services cloud then do we need to add the custom objects like Policies, PolicyHolder etc.
- Any helpful link to start with the Insurance app.

Thanks,
Jolly Birdi
Hi

I am getting "System.LimitException: Apex heap size too large: 67116041" error. Please find my below piece of code.

public static void checkC4StageLA(List<Account> accountList, Map<id,Account> oldMap){
        Transient Integer count = 0;
        List<Opportunity> oppList = new List<Opportunity>();
        
        system.debug('accountList '+accountList); 
        List<Account> accList = new List<Account>();
        Map<ID, List<Opportunity>> oppMap = new Map<ID, List<Opportunity>>();
        
        oppList = [SELECT ID, Name, AccountID, stageName FROM Opportunity WHERE AccountID IN : accountList];
         
         system.debug('accountList '+accountList); 
         if(oppList.size() > 0){
            List<Opportunity> tempOppList = new List<Opportunity>();
            for(Opportunity opp: oppList){ //Reason behind to write Query in for loop is: To avoid heap size limit exception.
                if(oppMap.containsKey(opp.AccountID)){
                    tempOppList.addAll(oppMap.get(opp.AccountID));    
                }
                tempOppList.add(opp);
                oppMap.put(opp.AccountID, tempOppList);    
            }
            
          }
          
          List<Profile> PROFILE = [SELECT Id, Name FROM Profile WHERE Id=:userinfo.getProfileId() LIMIT 1];
          String MyProflieName = PROFILE[0].Name;
          system.debug('MyProflieName  '+MyProflieName );
          
          for(Account acc: accountList){
              if(oppMap.containsKey(acc.ID) && oppMap.get(acc.ID).size() > 0){
                  for(Opportunity opp: oppMap.get(acc.ID)){
                      if(opp.stageName == 'C4- Payment Disbursed'){
                          System.debug('ID '+opp.ID);
                          count++;    
                      }
                  }
              }    
              
              System.debug('count '+count );
          //    System.debug('oppMap.get(acc.ID).size() '+oppMap.get(acc.ID).size());
              if(oppMap.get(acc.ID) != null){
                  if(count == oppMap.get(acc.ID).size() && (MyProflieName == 'Marketing Officer' || MyProflieName == 'Branch Manager') && oppMap.get(acc.ID) != null  ){
                      System.debug('count '+count+' oppMap.get(acc.ID).size() ' +oppMap.get(acc.ID).size());
                      acc.addError('You are not having authority to chage account details.');    
                  }
              }
              
              count = 0;
          }
            
    }
-------------------------------------------------------------------------------------------------------------------------------------------
This method I am calling in Before Update of Account Trigger.

Please suggest me, how I can resolve this error.

Thanks in advance,
Shruti Hasilkar.
Hello Guys,

I am working on a validation rule that will prevent the users from changing the status value.

I have two objects Test__c and Risk__c, both are having a look up relationship here.
I also have a Checkbox__c field on Test__c object and Status__c picklist field in Risk__c object.

My requirement is that if Checkbox__c on Test__c object is checked then only I should able to change the Status__c on Risk__c object.
Can anyone help me out to complete this if possible.
Hi All,
i have a field on Account called “Only_Default_Contact”, checkbox, default off
 
When a new Account is created, create a new Contact that has the following data points:
First Name = “Info”
Last Name = “Default”
Email = “info@websitedomain.tld”
and set Account Field Only_Default_Contact = TRUE

When the Account has more than 1 Contact, update Account field  Only_Default_Contact to FALSE.
public class TriggerAccountHelper {
    public static List<Account> newAccount = new List<Account>();
    public static List<Account> oldAccount = new List<Account>();
    public static Map<Id, Account> newMapAccount = new Map<Id, Account>();
    public static Map<Id, Account> oldMapAccount = new Map<Id, Account>();
  

    public static void CreatContact(){
         List<Contact> contactToInsert = new List<Contact>();
        for(Account acc : newAccount){
            Contact con = new Contact(LastName = 'test30',
                                      AccountId=acc.id
                                     );
            contactToInsert.add(con);
            if(contactToInsert.size() == 0){
                acc.OnlyDefaultContact__c = True;
            }
            else{
                acc.OnlyDefaultContact__c = False;
            }
        }
        
        if(!contactToInsert.isEmpty()){ 
            insert contactToInsert; 
         }
    
     }
}
i am executing the trigger on After insert.
its showing me this error:-Trigger_Account: execution of AfterInsert caused by: System.FinalException: Record is read-only Class.TriggerAccountHelper.CreatContact: line 19, column 1 Trigger.Trigger_Account: line 12, column 1
Hi All,

I am getting the error while traversing the JSON. could anybody please suggest me.

JSON Response: 
{
	"value": [{
		"groupid": null,
		"group_name": null,
		"sub_customer": "[{\"CustomerId\":\"94107804\",\"CustomerName\":\"MILTON ULLADULLA HOSPITAL\",\"Street\":\"PRINCES HIGHWAY,\"City\":\"MILTON\",\"PostalCode\":\"2538\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"94105686\",\"CustomerName\":\"PORT KEMBLA HOSPITAL\",\"Street\":\"COWPER STREET,\"City\":\"WARRAWONG\",\"PostalCode\":\"2502\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"94107702\",\"CustomerName\":\"THE NEW LITHGOW HOSPITAL\",\"Street\":\"Great Western Highway,\"City\":\"LITHGOW\",\"PostalCode\":\"2790\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"9487942\",\"CustomerName\":\"SHOALHAVEN DISTRICT MEMORIAL HOSPIT\",\"Street\":\"Shoalhaven Road,\"City\":\"NOWRA\",\"PostalCode\":\"2540\",\"Country\": Australia\",\"Assetcnt\":\"0\"}]"
	}, {
		"groupid": 1,
		"group_name": "PARENT: NEPEAN HOSPITAL",
		"sub_customer": "[{\"CustomerId\":\"9488490\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"Derby Street,\"City\":\"KINGSWOOD\",\"PostalCode\":\"2750\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"9488491\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"Great Western Highway,\"City\":\"PENRITH\",\"PostalCode\":\"2750\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"94106344\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"Unit 11, 83 Cox Avenue,\"City\":\"KINGSWOOD\",\"PostalCode\":\"2747\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"94126502\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"DERBY STREET,\"City\":\"KINGSWOOD\",\"PostalCode\":\"2747\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"94106486\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"SOMERSET STREET,\"City\":\"KINGSWOOD\",\"PostalCode\":\"2747\",\"Country\": Australia\",\"Assetcnt\":\"0\"},{\"CustomerId\":\"9488489\",\"CustomerName\":\"NEPEAN HOSPITAL\",\"Street\":\"Great Western Highway,\"City\":\"PENRITH\",\"PostalCode\":\"2750\",\"Country\": Australia\",\"Assetcnt\":\"0\"}]"
	}, 
	}]
}

Apex classes :
public class ValueWrapper {
    
    public class sub_Cus {
        @AuraEnabled
        public Double CustomerId {get; set;}
        @AuraEnabled
        public Double CustomerName {get; set;}
        @AuraEnabled
        public String Street {get; set;}
        @AuraEnabled
        public String City {get; set;}
        @AuraEnabled
        public String PostalCode {get; set;}
        @AuraEnabled
        public String Country {get; set;}
        @AuraEnabled
        public String Assetcnt {get; set;}
            
    }

    public class values {
        @AuraEnabled
        public Integer groupid {get; set;}
        @AuraEnabled
        public string group_name {get; set;}
        @AuraEnabled
        public List<sub_Cus> sub_customer {get; set;}
        
    }
    @AuraEnabled
    public List<values> value {get; set;}
}
 
Public class Vcustomerinfos{
   
    public ValueWrapper wrapper {get;set;}
   
  
  
    
          
   @AuraEnabled   
 public Static void getVcustomerlst(string search){
    
   string toUppercs = search.toUpperCase();
   string str;
   str= toUppercs.trim();   
   
   str = str.replaceAll('(\\s+)', '%20');    // White Spacing removing and substitute with %20
   system.debug('str*****'+str);
     
    /
     
     HttpRequest req = new HttpRequest(); 
     string edPnt = '*******';
     
     
     req.setMethod('GET');
     req.setEndpoint(edPnt);
     req.setTimeout(120000);   
     String username = ********;
     String password = *********** ;
        
    // initialize the variables 
    
    Blob headerValue = Blob.valueOf(username + ':' + password);
    req.setHeader('Content-Type', 'application/json');
    req.setHeader('Authorization', 'Basic **********');
    
           
    Http h = new Http();
    HttpResponse resp = new HttpResponse();   
    resp = h.send(req);
    
    system.debug('*************'+resp.getbody());
    ValueWrapper wrapper;
    wrapper = (ValueWrapper) JSON.deserializeStrict(resp.getBody(), ValueWrapper.class); -----------------------------------GETTING ERROR
    system.debug('wrapper********'+wrapper ); 
   }

    
  }
  • November 29, 2018
  • Like
  • 0
Hello,

i need to return a list of Campaigns which fullfill following requirement

WHERE Campaign.StartDate <= Today AND Campaign.EndDate + 7Days > Today

How can i do this in SOQL?

Thanks
Peter
Hi All,
When a new Account is created, create a new Contact that has the following data points:
First Name = “Info”
Last Name = “Default”
Email = “info@websitedomain.tld”
Only_Default_Contact = TRUE
When the Account has more than 1 Contact, update Only_Default_Contact to FALSE.
Hi All,
I need help in writing test class for trigger. I have written but its giving only 65%. Please help me.
trigger test1 on obj1__c (after insert, after update)
{
if(trigger.isAfter&& (trigger.isinsert || trigger.isUpdate))
{
    test3.method1(Trigger.New);
}
}
 
public class test3
{
    public static void method1(List<Obj1__c> o1)
    {
        map<string, obj1__c> ObjMap = new map<string, obj1__c>();
    
    for(obj1__c obj: o1)
    {
        if (obj.Shared_Field__c != Null)
        {
            ObjMap.put(obj.Shared_Field__c, obj);
        }
    }
    
    List<obj2__c> obj2l = [SELECT Id, Shared_Field__c, F1__c,f2__c 
                        FROM obj2__c WHERE Shared_Field__c IN :ObjMap.KeySet()];
    List<obj2__c> obj2list = new List<obj2__c>();
    
    for(obj2__c c: obj2l)
    {
        obj1__c obj = ObjMap.get(c.Shared_Field__c);
        c.f1__c = obj.f1__c;
        c.f2__c = obj.f2__c;
        
        obj2list.add(c);
    }
    
    if(obj2list.size() > 0)
    {
        update obj2list;
    }
    }
    
}

Thanks in Advance

 
write a formula field for If the salary field is 10000 the total salary should increase 10% and show the result in Percentage.
I am trying to understand the basic concept of Aura.Action in lightning but stuck with an error.
ChildComp.cmp

<aura:component >
    
    <aura:attribute name="childTitle"
                    access="global"
                    default="Default Child Title"
                    type="string"/>
    
    <aura:attribute name="onParentClick"
                    type="Aura.Action"/>
    <lightning:layout>
    
    <lightning:layoutItem>
          <div class="header-column">
                    <p class="field-title" title="Child Title Is">Child Title</p>
                    <p>{!v.childTitle}</p>
                </div>
                <div>
                  <lightning:input type="text"
                                   label="Enter some value..."
                                   aura:id="inputChildTitle"
                                   disabled="true"/>
                    
                </div>
        <lightning:button label="Change My Title"
                          onclick="{!c.ChangeTitle}"/>
        
        <!-- Create a button here -->
             <lightning:button label="Enable Child TextBox"
                               onclick="{!v.onParentClick}"/>
        </lightning:layoutItem>
    </lightning:layout>
    
	
</aura:component>

ChildCompController.js

({
	ChangeTitle : function(component, event, helper) {
        component.set("v.childTitle","Changed Title From Child Itself");
	}
})


ParentComp.cmp

<aura:component >
	
  <aura:attribute name="parentTitle"
                    access="global"
                    default="Default Parent Title"
                    type="string"/>
    
     <lightning:layout>
    
    <lightning:layoutItem>
          <div class="header-column">
                    <p class="field-title" title="Parent Title Is">Parent Title</p>
                    <p>{!v.parentTitle}</p>
                </div>
                
         </lightning:layoutItem>
    </lightning:layout>
    
    <c:ChildComp aura:id="childCmp"
                  onParentClick="{!c.EnableTextBox}"/>  
</aura:component>

ParentCompController.js

({
	EnableTextBox : function(component, event, helper) {
		
        debugger;
        //Now find the textbox which is defined in child comp
        var inputChildTitle=component.find("inputChildTitle");
        
        console.log("inputChildTitle="+inputChildTitle);
        
        inputChildTitle.set("v.disabled",false);
	}
})
The error is in the statement  " inputChildTitle.set("v.disabled",false);"

Please help me 

thanks
sheila
 

I'm getting input values as string for fields like month__c = '4' and year__C = '2009'. now I have to calcuate the the number of months and number of years then save it to the fields months__c and year__c.

example:

user input in lighning page

enter month joined =4 (months__C field)

enter year joined = 2009 (years__c field)

Output should be: 

years__c = 9

months__c = 4

how to do this? 

I also have date(StartDate__c) field which will save the date as 4/1/2009 should I use the formula field? or do I need to work this in controller class. The whole purpose is to send these fields in to the integration payload. 

 

 

 

Hi All,

I would like to query picklist length but I don't find a way to do so. Is it possible using SOQL?

Thanks,
Pooja
I want users to edit some particular field only on every friday,

For this i used following validation:

CASE( WEEKDAY(DATEVALUE(CreatedDate)),
2, ISCHANGED(Age_in_Years__c),
3, ISCHANGED(Age_in_Years__c),
4, ISCHANGED(Age_in_Years__c),
5, ISCHANGED(Age_in_Years__c),
NOT(ISCHANGED(Age_in_Years__c)))

but it is throwing an error: "Incorrect argument type for function 'CASE()'"

Can any one help me on this.

Thanks,
Ranga.V
Hi,
Below is my simple Trigger on two custom objects with MD relationship,
For Name I am getting Id, where as for Property__c I am getting correct Value.
below is my trigger
trigger CreateNewRecord on Deal__c (after insert, after update) 
    {
    set<id> triggerIds = trigger.newMap.keyset();
	List <Project__c> Project = [select id, Name, Deal__r.Property__r.Name from Project__c where id in :triggerIds];
    for(Deal__c deal : Trigger.new)
    {
        if( deal.Type__c == 'New' ) 
            
            Project.add(new Project__c
                              (
								Name = deal.Property__r.Name, // this field is giving ID instead of Name
								Property__c = deal.Property__c // This field is giving correct update.
                              )
                        );
    }
        insert Project;
    }

 
  • November 12, 2018
  • Like
  • 0
Hi Experts,

As I don't know much about JavaScript. Please help me on the below issues.

Below are the steps where I need help:
a. When I click on search supplier without entering any keywords the error is displayed "Please provide the supplier name" - which is correct.
b. When the keyword is entered and clicks on search supplier, the result is displayed. - correct
c. Remove the search keyword and click on search supplier button, the validation message and result table are displayed simultaneously. - which is not good. (Expected: only the validation message should be displayed.)

Please help me how to write a proper javascript UI for this as I am new to this.

If required I can share my code.

Thanks.
User-added image

As per above screen-shot i had inserted data in Former Employer2. I am getting Experience but i am not getting Total Experience. If i am inserting data in Former Employer1 than i am getting both Experience and Total Experience. If any solution is there please help me to solve this.
I am for a 24 hour period how many chats are  ABANDONED  and it percentage to total requested. The formula I used to create the time interval field on Request Time is (Time interval formula field).User-added image
 
TEXT(VALUE( MID( TEXT( RequestTime - 0.2085), 12, 2 ) )) + " " +
IF(VALUE( MID( TEXT( RequestTime - 0.2085), 15, 2 ) ) <= 29, ":00", ":30")
 
The times are like this User-added image
That give me the time, but its so weird that when I sort by ascending it’s still showing 5 pm below 23:00….