• Kaity
  • NEWBIE
  • 105 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 92
    Questions
  • 124
    Replies
Hi, I have a prospect custom object and an Opportunity standard object. The requirement is- a prospect can have many opportunities. How can i achieve this requirement? (A standard object can not child,. So, here, Opportunity can not be in Detail side)

-Kaity
  • December 03, 2017
  • Like
  • 0
Hi,
I am a system Admin for my Developer org. However, on editing the profile, I am seeing 'Manage Encryption Keys' is still in disabled mode. How can i enable 'Manage Encryption Keys' in System Admin profile?

-Kaity
  • October 07, 2017
  • Like
  • 0
Hi,
I have 3 apex jobs which run one by one(Completion of the first job, the second job starts). However the first job is trigger by the Middleware. So, as a result "Job Submitted By" is always shows the Integration User. 
I want to stamp the "Job Submitted By"  by my name. What is the way through which I can meet this requirement. Please suggest. Thanks!

-Kaity
  • February 26, 2017
  • Like
  • 0
Hi, While writing this trigger, I am getting this error below  marked as underline-
Incompatible element type Id for collection of Opportunity​


Please help to resolve the issue

 
trigger  UpdateOpportunity on Top_X_Designation__c (after Insert, after Update, after Delete) {
List<Opportunity> lstopp = new List<Opportunity>();
List<Opportunity> lstOppUpdated = new List<Opportunity>();

  // Set<Id> lstOppUpdated = new Set<Id>();

Map <Id, Id> docAttachTrue = new Map<id,id>();
Map <Id, Id> docAttachFalse= new Map<id,id>();
Map <Id, Id> docAttachDel = new Map<id,id>();

Set<id> opptySetId = new Set<id>();
Set<id> opptySetDel = New Set<id>();

if(Trigger.IsInsert || Trigger.IsUpdate){
for(Top_X_Designation__c txd: Trigger.new){
  if(txd.Type__c=='Contract Flow Down/Handoff' && txd.Document_Attached__c == True ){
   docAttachTrue.put(txd.Opportunity__c, txd.id);
   opptySetId.add(txd.Opportunity__c);
  }
  else
   docAttachFalse.put(txd.Opportunity__c, txd.id);
   opptySetId.add(txd.Opportunity__c);
    }
    }
    
    if(Trigger.IsDelete){
    for(Top_X_Designation__c txdold: Trigger.old){
    docAttachDel.put(txdold.Opportunity__c, txdold.id);
    opptySetId.add(txdold.Opportunity__c);
    opptySetDel.add(txdold.Opportunity__c);
    }
  
}


lstopp = [SELECT ID, Handoff_Attached__c FROM Opportunity WHERE id in : opptySetId];
 if(lstopp.size()>0 && lstopp!= null){
   for(Opportunity opp:lstopp){
    if(docAttachTrue.containsKey(opp.id)){
      opp.Handoff_Attached__c = 'Yes';
 }
 if(docAttachFalse.containsKey(opp.id)){
      opp.Handoff_Attached__c = 'No';
 }
 
 if(opptySetDel.contains(opp.id)){
      opp.Handoff_Attached__c = '';
 }
 lstoppUpdated.add(opp.id);  //Error: Incompatible element type Id for collection of Opportunity​
}
  if(lstoppUpdated.size()>0 && lstoppUpdated != null){
    update lstoppUpdated;
    }
  }
  
 }

Thanks,
Kaity
  • February 19, 2017
  • Like
  • 0
Hi Experts,
Need help here-

I have created a custom setting. By clicking the VisualForce tab, I want to reach to the screen of the Custom setting.How to achieve this?

<apex:page action="{!URLFOR($Resource.myStaticResourceURL)}"/>

Thanks,
Kaity

 
  • November 26, 2016
  • Like
  • 0
HI,
On clicking a custom Tab, user should be redirected to one of the custom settings. The code is as below:
I want to make the URL as dynamic sothat i need to change the URL(https://ABC-INT.cs18.my.salesforce.com/). Please suggest.
public with sharing class ActivitiesController {
    public PageReference redirect() {
        return new PageReference('https://ABC-INT.cs18.my.salesforce.com/setup/ui/listCustomSettingsData.apexp?com.salesforce.visualforce.ViewStateCSRF=VmpFPSxNakF4TmkweE1TMHdORlF3T1Rvd05Eb3pOQzR5TkROYSxFbVV1SDVydmdzTXJnXzNWNXFTdjZhLE56RTNPVGcz&com.salesforce.visualforce.ViewStateVersion=201610312000010466&CS_Defn_View%3ACS_View=CS_Defn_View%3ACS_View&CS_Defn_View%3ACS_View%3AtheDetailBlock%3AdetailButtons%3Amanage=Manage&id=a1V&retURL=%2Fsetup%2Fui%2FviewCustomSettings.apexp%3Fsetupid%3DCustomSettings%26id%3D01I11000000AdEY');
    }
}
  • November 12, 2016
  • Like
  • 0
Hi experts,
I've a requirement as follows:
I have a custom Setting where I have mentioned the State code of all states:Like-
Sate---- Code
AP------- 001
UP------- 002
JK ------- 003
HD------- 004

Whenever a new account is created, based upon the state code of the state, a field in Account namely 'StateCode__c' will be updated.

Thanks,
Kaity

 
  • October 14, 2016
  • Like
  • 0
Hi,
I have a customer requirement where they donot want to land into Salesforce standard Home Page, rather they want to land into a customized Page after successful login. Is it possible to achieve this without using community? Please help.
  • September 28, 2016
  • Like
  • 0
Hi experts,

I'm going to appear in Sales Cloud Consultant Certification next week. Can someone help me or guide me in writing the exam or send some sample questions if you have? Thanks in advance!

My email address is:  kaity0008@gmail.com
 
  • November 15, 2015
  • Like
  • 0
Hi Adminstrators and Developers,
Is there any way, to stop the auto email trigger to the user when the user is newly created? Please help.

-Kaity
  • November 03, 2015
  • Like
  • 0
Hi, 
Can some one would help me on-  What is the SOQL for retrieving the list of Users who are Moderators in a Private or Public Group?

​Thanks,
Kaity
  • November 03, 2015
  • Like
  • 0
Hi,
Can some one would help me on-  What is the SOQL for retrieving the list of Users who are Moderators in a Private or Public Group?

Thanks,
Kaity
  • November 03, 2015
  • Like
  • 0
Hi Experts,
I have a requirement to send email to a recient when a batch job gets failed. I want to test it from Developer console. Please help.

Thanks.
Kaity
  • July 21, 2015
  • Like
  • 0
Hi,
I have the below requirement.
Suppose I have a visual force page where i want to Assign Accounts to various users based upon certain criteria. I have implemented this portion.
However, if I want to revert back to the initial phase(prior to save) after sometime(in different transaction), how can we achieve this?


NOTE: I think savepoint() and rollback() can not be sole this problem. Sunce after safe, we lost the transaction. Please help!
Thanks,
Kaity
  • June 18, 2015
  • Like
  • 0
Hi,
What is the difference between DML statements and DML Queries?

Thanks
  • February 12, 2015
  • Like
  • 0
Hi,

I just want to know the flow of the control for this below code.

Query: 
UserCacheLoaded = False , then when we are using this variable in the IF, it will not go Inside the code. And henceforth, CacheUserInfo() method will never be called. 
Can someone explain this? Thanks in advance...




public class ThinkingInApex{

 private static Boolean UserCacheLoaded =  false;
 private static Boolean UserIsSpecial =  false;
  private static String UserTimeZone =  false;
 
  public static Boolean IsUserSpecial(){

   if(UserCacheLoaded)
      return UserIsSpecial;
  CacheUserInfo();
      return UserIsSpecial;

private static void CacheUserInfo(){
  if(UserCacheLoaded) return;
User u = [SELECT UserIsSpecial__c, TimeZoneSidKey FROM User where ID =: UserInfo.getUserId()];
 UserIsSpecial  = u.UserIsSpecial__c;
 UserTimeZone  = u.TimeZoneSidKey;
 UserCacheLoaded = True;
  }
 }


Thanks,
Kaity
  • February 01, 2015
  • Like
  • 0
Hi,
When and what is the usecase of 'Type Class' in Sa;esForce. I just read in the SalesForce link, however not able to understand, where this concepts plays role in the implementation:

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_type.htm#apex_System_Type_newInstance

Can anyone knowDoesDo anyone knows this concept?

Thanks,
Milan
  • January 20, 2015
  • Like
  • 0
Hi-

I am writing this code snippet in Developer console:

List<Lead> ledLst = [Select Id, Name From Lead where ID IN : Trigger.NewMap.keySet()];
System.debug('$$$$$$$'+ledLst);


But, I am getting the beloe Error:

System.NullPointerException: Attempt to de-reference a null object.

What is wrong in my snippet?

Thanks,
Kaity
 
  • January 20, 2015
  • Like
  • 0
Hi,
Can someone explain, can we make Apex SOAP callout in a synchronous manner? My understanding was- whenever we make APEX SOAP callout, we need to do with @future, which is asynchronous.

-Kaity
  • January 15, 2015
  • Like
  • 0
Hi,

I just want to know the concept and whether we can do it in the following way:

Suppose SalesForce is integrated with 2 legacy Systems, Say- XYZ and PQR. SalesForce to XYZ has SSO enabled. And We have done through Federated Authentication using SAML2.0.

Can we make SalesForce to PQR authentication through OAuth(Here we donot have the SSO Implemented)?  I mean to say that, in a single SalesForce instance, can we do 2 types of Authentication for 2 different interfaces,(Here like SSO(SAML) and OAuth)?

Can someone explain the concept here?

-Kaity
  • January 15, 2015
  • Like
  • 0
Hi,
I have 3 apex jobs which run one by one(Completion of the first job, the second job starts). However the first job is trigger by the Middleware. So, as a result "Job Submitted By" is always shows the Integration User. 
I want to stamp the "Job Submitted By"  by my name. What is the way through which I can meet this requirement. Please suggest. Thanks!

-Kaity
  • February 26, 2017
  • Like
  • 0
Hi, While writing this trigger, I am getting this error below  marked as underline-
Incompatible element type Id for collection of Opportunity​


Please help to resolve the issue

 
trigger  UpdateOpportunity on Top_X_Designation__c (after Insert, after Update, after Delete) {
List<Opportunity> lstopp = new List<Opportunity>();
List<Opportunity> lstOppUpdated = new List<Opportunity>();

  // Set<Id> lstOppUpdated = new Set<Id>();

Map <Id, Id> docAttachTrue = new Map<id,id>();
Map <Id, Id> docAttachFalse= new Map<id,id>();
Map <Id, Id> docAttachDel = new Map<id,id>();

Set<id> opptySetId = new Set<id>();
Set<id> opptySetDel = New Set<id>();

if(Trigger.IsInsert || Trigger.IsUpdate){
for(Top_X_Designation__c txd: Trigger.new){
  if(txd.Type__c=='Contract Flow Down/Handoff' && txd.Document_Attached__c == True ){
   docAttachTrue.put(txd.Opportunity__c, txd.id);
   opptySetId.add(txd.Opportunity__c);
  }
  else
   docAttachFalse.put(txd.Opportunity__c, txd.id);
   opptySetId.add(txd.Opportunity__c);
    }
    }
    
    if(Trigger.IsDelete){
    for(Top_X_Designation__c txdold: Trigger.old){
    docAttachDel.put(txdold.Opportunity__c, txdold.id);
    opptySetId.add(txdold.Opportunity__c);
    opptySetDel.add(txdold.Opportunity__c);
    }
  
}


lstopp = [SELECT ID, Handoff_Attached__c FROM Opportunity WHERE id in : opptySetId];
 if(lstopp.size()>0 && lstopp!= null){
   for(Opportunity opp:lstopp){
    if(docAttachTrue.containsKey(opp.id)){
      opp.Handoff_Attached__c = 'Yes';
 }
 if(docAttachFalse.containsKey(opp.id)){
      opp.Handoff_Attached__c = 'No';
 }
 
 if(opptySetDel.contains(opp.id)){
      opp.Handoff_Attached__c = '';
 }
 lstoppUpdated.add(opp.id);  //Error: Incompatible element type Id for collection of Opportunity​
}
  if(lstoppUpdated.size()>0 && lstoppUpdated != null){
    update lstoppUpdated;
    }
  }
  
 }

Thanks,
Kaity
  • February 19, 2017
  • Like
  • 0
Hi Experts,
Need help here-

I have created a custom setting. By clicking the VisualForce tab, I want to reach to the screen of the Custom setting.How to achieve this?

<apex:page action="{!URLFOR($Resource.myStaticResourceURL)}"/>

Thanks,
Kaity

 
  • November 26, 2016
  • Like
  • 0
HI,
On clicking a custom Tab, user should be redirected to one of the custom settings. The code is as below:
I want to make the URL as dynamic sothat i need to change the URL(https://ABC-INT.cs18.my.salesforce.com/). Please suggest.
public with sharing class ActivitiesController {
    public PageReference redirect() {
        return new PageReference('https://ABC-INT.cs18.my.salesforce.com/setup/ui/listCustomSettingsData.apexp?com.salesforce.visualforce.ViewStateCSRF=VmpFPSxNakF4TmkweE1TMHdORlF3T1Rvd05Eb3pOQzR5TkROYSxFbVV1SDVydmdzTXJnXzNWNXFTdjZhLE56RTNPVGcz&com.salesforce.visualforce.ViewStateVersion=201610312000010466&CS_Defn_View%3ACS_View=CS_Defn_View%3ACS_View&CS_Defn_View%3ACS_View%3AtheDetailBlock%3AdetailButtons%3Amanage=Manage&id=a1V&retURL=%2Fsetup%2Fui%2FviewCustomSettings.apexp%3Fsetupid%3DCustomSettings%26id%3D01I11000000AdEY');
    }
}
  • November 12, 2016
  • Like
  • 0
Hi experts,
I've a requirement as follows:
I have a custom Setting where I have mentioned the State code of all states:Like-
Sate---- Code
AP------- 001
UP------- 002
JK ------- 003
HD------- 004

Whenever a new account is created, based upon the state code of the state, a field in Account namely 'StateCode__c' will be updated.

Thanks,
Kaity

 
  • October 14, 2016
  • Like
  • 0
Hi,
I have a customer requirement where they donot want to land into Salesforce standard Home Page, rather they want to land into a customized Page after successful login. Is it possible to achieve this without using community? Please help.
  • September 28, 2016
  • Like
  • 0
Hi Adminstrators and Developers,
Is there any way, to stop the auto email trigger to the user when the user is newly created? Please help.

-Kaity
  • November 03, 2015
  • Like
  • 0
Hi, 
Can some one would help me on-  What is the SOQL for retrieving the list of Users who are Moderators in a Private or Public Group?

​Thanks,
Kaity
  • November 03, 2015
  • Like
  • 0
Hi-

I am writing this code snippet in Developer console:

List<Lead> ledLst = [Select Id, Name From Lead where ID IN : Trigger.NewMap.keySet()];
System.debug('$$$$$$$'+ledLst);


But, I am getting the beloe Error:

System.NullPointerException: Attempt to de-reference a null object.

What is wrong in my snippet?

Thanks,
Kaity
 
  • January 20, 2015
  • Like
  • 0
What is the difference between Query() and QueryMore()? Can you please explain with a usecase? I have read the blogs of SalesForce but didnot understand.

-Kaity
  • January 13, 2015
  • Like
  • 0
Hi Integration Experts,

Can I use both REST and SOAP API while integrating SalesForce with any 3rd Party Legacy system? 
Which approach provides easy authentication as per implementation is concern? Please explain. 

-Kaity
  • January 12, 2015
  • Like
  • 0
Hello everybody,
When do we use JSON in APEX? Can some one explain elaborately. Many Thanks.

-Kaity
  • January 09, 2015
  • Like
  • 0

Hi,
My understanding was, we can not use 'webservice' keyword in trigger. However, I saw in apex guide, we can use 'webservice' key word.

You can only use the webService keyword in a trigger when it is in a method defined as asynchronous; that is, when the
method is defined with the @future keyword.


Can someone clear me this idea? How to write a code here, any example..

Thank you.
 
  • January 08, 2015
  • Like
  • 0
Hi,
What is the difference between set and private set? And when do we use private set?
example: 
public ApexPages.StandardSetController ssc {get; private set;}

Please advice.

-Kaity
  • December 30, 2015
  • Like
  • 0
Salesforce.com Administrator needed in Irvine CA. Be a part of a great working environment - full time and pay is commensurate with experience. Please let us know if you (or anyone you know) are interested!! Email nancy@tech2resources.com.