• Ganeeesh
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 8
    Likes Received
  • 0
    Likes Given
  • 76
    Questions
  • 58
    Replies
Hi Can any one help me on this, I have created validtion rule which avoids the special characters except comma(,) fullstop(.) space( ), but i need to accept Enter key also(when i use enter key am getting error like please avoid special characters , even though am using enter key am not supposed to get this error). 

THis is my validation rule am using  NOT(REGEX( Description,"^[a-z A-Z 0-9,.]*$" )) 

 
Hi I have created side bar panel in visualforce page with css,html. In one tab i need to display chatter feed , for that i have used this tag "<chatter:feed entityId="{!$User.Id}" />" but when i use this tag. the entire page look and feel will change means entire page size will decreaseing. how to aviod this problem. please let me know if any one knows.
Hi any one help me on this "can we move move class from sand box to production withou test class?".

  id myProductId; 
  Public Document_Reference_Junction__c DocuRefIP { Get; Set; }
Hi

while running test classs , test method has failed it shows List has no rows for assignment to SObject. any one help me how to avoid this error. and this is my class.

public class sample{
public sample(){
  DocuRefIP = New Document_Reference_Junction__c();
  myProductId=ApexPages.CurrentPage().getParameters().get('Id');
  DocuRefIP.Installed_Product__c=[select id from SVMXC__Installed_Product__c where id=:myProductId limit 1].id;
  }  
}
Can anyone help me I would like to  implement account hierarchy exact functionality on custom object. Like account we have created self relationship on custom object. 
Is any one help me how to undelete record using soql query..? 

I am using this query "Contact[] c = [select id from contact where isDeleted = true LIMIT 1000 ALL ROWS];
undelete c;"
When i use this query I am getting this error "System.DmlException: Undelete failed. First exception on row 0 with id 00390000019TLhkAAG; first error: UNDELETE_FAILED, Entity is not in the recycle bin: []".

Can any one help how to undelete records using soql query.?
 
Hi Please any one can help with solution, i am getting following error,  while writing controller "System.LimitException: Maximum stack depth reached: 1001 ". And this is my controller. May I know what is the Error, why I am getting this erroe and in which cases I am getting this type of error.

public with sharing class jkk_save1_controller {

public contact acc{get;set;}
public jkk_save1_controller(){
acc=new contact();
}

public PageReference savecon() {
return null;
}
}
 
Can anybody help me In case object I have overridden edit button so that I loss inline edit functionality. For inline edit support I have created one visual force page using the following tag <support:caseFeed caseId="{!case.Id}"/> . Eventhough I am not getting inline edit functionality. Can anybody help me please.
Hi every one,

    I have overridden edit button with visualforce page so the I lost inline edit feture in record detail page. Then how I can get inline edit option in record detail page. Can anybody help me.
Can anybody help me how to retrieve all reports meta data using workbench..?. please send me xml code. Here I am using this xml code but its not working porperly.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
  <members>Reportname</members>
<name>Report</name>
</types>
  <version>24.0</version>
</Package>
Can any body help me when a batch apex is running under a user mode if we deactivate that user then what happened..?
Can any body help me how many jobs are active in batch apex salesforce..?
Any body help me on this class code coverage..? this is my actual class

public with sharing class AddInvoiceCreditToEducation {

    public String pgmsg { get; set; }
    public AddInvoiceCreditToEducation(){
    string myDate;
    Account accRec=[select id,name,Current_Ed_Amount__c,Expiration__c from Account where id=:ApexPages.CurrentPage().getParameters().get('id')];
    myDate= string.valueof(accRec.Expiration__c.year())+'-'+string.valueof(accRec.Expiration__c.Month())+'-'+string.valueof(accRec.Expiration__c.Day());
    pgmsg='Education Update Successfull.....'+' '+ +'$'+ accRec.Current_Ed_Amount__c + ' ' + + 'Will Expire on'+ +' '+ myDate;
   
    }
    public PageReference cancel() {
    pagereference ref=new pagereference('/'+Apexpages.currentpage().getparameters().get('invId'));
    return ref;
   
        //return null;
    }

}


when i am running test class for the above test class i am getting error like list has no rows to assignment (test class failed)
and following is my test class.

@isTest
private class AddInvoiceCreditToEducation_UT{
  static testMethod void My_method(){ 
      // setup a ship to account
        Account shipTo = new Account();
        shipTo.Name = 'PSAV 6FOO';
        shipTo.Type = 'Supplier';
        shipTo.Expiration__c = system.today()+1;
        shipto.Current_Ed_Amount__c = 100;
        insert shipTo;
        Contract ocon = new Contract(name= 'test');
        ocon.AccountId=shipTo.id;
        ocon.StartDate = date.newInstance(2014, 10, 7);
        insert ocon;
        Contact ocont = new Contact(LastName= 'test');
        ocont.AccountId=shipTo.id;
        insert ocont;
        License_Invoice__c o1 = new License_Invoice__c();
        o1.Account__c = shipTo.id;
        o1.Contract__c = ocon.id;
        o1.Bill_To__c = ocont.id;        
        insert o1;
        List<Invoice_Product__c> invoicelist=new list<Invoice_Product__c>();
        Invoice_Product__c oip = new Invoice_Product__c(Contract__c = ocon.id,License_Invoice__c=o1.Id);
        Account accRec=[select id,name,Current_Ed_Amount__c,Expiration__c from Account where id=:shipTo.id];
  AddInvoiceCreditToEducation obj=new AddInvoiceCreditToEducation();
  obj.cancel();
     
   
  }
}

any body help me how to get code coverage for this
Can anybody help me triggers runs in user mode or system mode. If triggers runs in system mode only , please give me idea to run trigger in user mode.
Is there any chance to run trigger in user mode..?
Can anybody help me which is the junction object between Case and Solution..? and also relationship among these objects.
Hi all ,

         Can anybody explain what is the difference between opportunity line item and product and what is the juction object here..?
Hi  All, I would like to know what is the Difference between Apex sharing and and sharing rules. If anybody know the difference please share to me.
Hi any body help me I have a component which contains text fields , I am using this component in visualforce page , but here my requirement is next to the component I have command button save. When ever i click this button thouse values will be inserted to object. How can i achieve this.?
Hi friends here i am trying to display lokkup fields on vf page using apex:inputField tag but the problem is field and lookup icon displays line by line(field displays on top and lookup icon displays below the field) how do i display field and lookup icon side by side..? . For maore clarification look at this pic.please look at this pic you can understand easily.
i have an image field , i this field i am displaying image. Here i need to display these all records images in the form of tiles on VF page. Can any body help me..?
i have an image field , i this field i am displaying image. Here i need to display these all records images in the form of tiles on VF page. Can any body help me..?

Can anybody help me what are the Standard sales cloud objects..? can anybody list of those standard salescloud objects..?

i have written a class for Case merge functionality , But the problem is when ever i call this class from trigger it shows error .... can anybody help me how can i call this class from trigger....? and this this is my class please send me how can i call this class from trigger..

 

public with sharing class casemerge{

public void mergecases(Case dupcase,Id mastercaseid){

System.debug('*************dupcase records**************'+dupcase);

//--------Duplicate all attachments

 List<Attachment> AttachmentsToBeCreated = new List<Attachment>();  

for (Attachment a : [SELECT Name, IsPrivate, Description, Body FROM Attachment WHERE ParentId = :dupCase.Id AND IsDeleted=false]){

 AttachmentsToBeCreated.add(new Attachment(ParentId = masterCaseId,Name = a.Name,IsPrivate = a.IsPrivate,Description = a.Description,Body = a.Body));        

}        

//-------Duplicate all comments

 List<CaseComment> CommentsToBeCreated = new List<CaseComment>();

 for (CaseComment cc : [SELECT IsPublished, CreatedDate, CommentBody FROM CaseComment WHERE ParentId = :dupCase.Id AND IsDeleted=false]) {

 CommentsToBeCreated.add(new CaseComment(ParentId = masterCaseId,IsPublished = cc.IsPublished,CommentBody = 'This case comment was originally created on ' + cc.CreatedDate +' and was merged into this case.\r\r' + cc.CommentBody));        

}

 if (!CommentsToBeCreated.IsEmpty())

 insert CommentsToBeCreated;

//-------Change the whatid for all tasks

List<Task> allTasks = [SELECT Id, WhatId FROM Task WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allTasks.isEmpty()) {    

for (integer i = 0; i < allTasks.size(); i++)    

allTasks[i].WhatId = masterCaseId;    

update allTasks;        

}

//-----Change the whatid for all Events

List<Event> allEvents = [SELECT Id, WhatId FROM Event WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allEvents.isEmpty()) {

for (integer i = 0; i < allEvents.size(); i++)

allEvents[i].WhatId = masterCaseId;            

update allEvents;        

}      

// duplicate all the attachments (of the case and related emails)

if (!AttachmentsToBeCreated.IsEmpty())

insert AttachmentsToBeCreated;  

// delete the original case and all it's related items

delete dupCase;

}

}

Any body help me how can i merge Case object records using trigger and apex class .. please send me example code...

Can anybody help me i am merging cases, those are not merging. If i am going to merg the case records it shows an error can anybody help to rectify this Error the Error is" Error: Compile Error: Specified type SOBJECT:Case cannot be merged at line 9 column 1 "

and this is my code...........................................

 

Case masterCase = [SELECT Id, casenumber,Accountid,Contactid,origin FROM Case WHERE Accountid = '0019000000jiDIX' AND Contactid = '0039000000iOKkH' AND origin = 'Phone' LIMIT 1]; System.debug('************master*****************'+mastercase); Case mergeCase = [SELECT Id, casenumber,Accountid,Contactid,origin FROM Case WHERE Accountid = '0019000000jiDIX' AND Contactid = '0039000000iOKkH' AND origin = 'Email' LIMIT 1]; System.debug('************merge*****************'+mergecase);

try {    

merge masterCase mergeCase;

}

catch (DmlException e) {    

// Process exception here

}

Can Body help me What are the static variables in salesforce..? give me some examples..

Can any body help me how can i merge Case object records using trigger... please send me code..

Can any body help me what are the differences between SOAP API and REST API..?

Hi Can any one help me on this, I have created validtion rule which avoids the special characters except comma(,) fullstop(.) space( ), but i need to accept Enter key also(when i use enter key am getting error like please avoid special characters , even though am using enter key am not supposed to get this error). 

THis is my validation rule am using  NOT(REGEX( Description,"^[a-z A-Z 0-9,.]*$" )) 

 
Can anybody help me triggers runs in user mode or system mode. If triggers runs in system mode only , please give me idea to run trigger in user mode.
Is there any chance to run trigger in user mode..?
Hi all ,

         Can anybody explain what is the difference between opportunity line item and product and what is the juction object here..?
Hi  All, I would like to know what is the Difference between Apex sharing and and sharing rules. If anybody know the difference please share to me.
Hi friends here i am trying to display lokkup fields on vf page using apex:inputField tag but the problem is field and lookup icon displays line by line(field displays on top and lookup icon displays below the field) how do i display field and lookup icon side by side..? . For maore clarification look at this pic.please look at this pic you can understand easily.
Can anybody help me how to override standard home tab with Account recordsdetail page..? when ever i login into my org then i can able  to see Account records detail page..?

Can anybody help me i need test class for this trigger..

 

trigger testopp1 on Opportunity (before insert,before update) {

for(Opportunity opp : Trigger.new){

System.debug('****************************'+opp.recordtypeid);

String rectype=[select id,name from RecordType where name =: 'Rec Type1'].id;

System.debug('********convert id into sting************'+rectype);

if(opp.StageName =='Prospecting' && opp.Probability == 10 && opp.recordtypeid == rectype){

if(opp.Amount == null){

opp.Amount.addError('****enter amount*****');

}

}

}

}

Normally we have Quotes related list on Opportunities, But here my requirement is I need "Create PDF" Button on Opportunity record page. Whenever we click on "Create PDF"  button a navigation menu will come which contain Quote1, Quote2, Quote3 ...... etc whenever we click on Quote1 , Quote1 pdf will generate. And whenever we click on Quote2 , Quote2 pdf will generate. How can i get this scenario...? 

i would like to post a doubt by showing on image can any body help me how can add that image to this body..?

what is opportunity line item where is it lacated..? . Why we need this line items , what is the relationship between opportunity..? can any body giveme brief explanation ..?

i have written a class for Case merge functionality , But the problem is when ever i call this class from trigger it shows error .... can anybody help me how can i call this class from trigger....? and this this is my class please send me how can i call this class from trigger..

 

public with sharing class casemerge{

public void mergecases(Case dupcase,Id mastercaseid){

System.debug('*************dupcase records**************'+dupcase);

//--------Duplicate all attachments

 List<Attachment> AttachmentsToBeCreated = new List<Attachment>();  

for (Attachment a : [SELECT Name, IsPrivate, Description, Body FROM Attachment WHERE ParentId = :dupCase.Id AND IsDeleted=false]){

 AttachmentsToBeCreated.add(new Attachment(ParentId = masterCaseId,Name = a.Name,IsPrivate = a.IsPrivate,Description = a.Description,Body = a.Body));        

}        

//-------Duplicate all comments

 List<CaseComment> CommentsToBeCreated = new List<CaseComment>();

 for (CaseComment cc : [SELECT IsPublished, CreatedDate, CommentBody FROM CaseComment WHERE ParentId = :dupCase.Id AND IsDeleted=false]) {

 CommentsToBeCreated.add(new CaseComment(ParentId = masterCaseId,IsPublished = cc.IsPublished,CommentBody = 'This case comment was originally created on ' + cc.CreatedDate +' and was merged into this case.\r\r' + cc.CommentBody));        

}

 if (!CommentsToBeCreated.IsEmpty())

 insert CommentsToBeCreated;

//-------Change the whatid for all tasks

List<Task> allTasks = [SELECT Id, WhatId FROM Task WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allTasks.isEmpty()) {    

for (integer i = 0; i < allTasks.size(); i++)    

allTasks[i].WhatId = masterCaseId;    

update allTasks;        

}

//-----Change the whatid for all Events

List<Event> allEvents = [SELECT Id, WhatId FROM Event WHERE WhatId = :dupCase.Id AND IsDeleted=false];

if (!allEvents.isEmpty()) {

for (integer i = 0; i < allEvents.size(); i++)

allEvents[i].WhatId = masterCaseId;            

update allEvents;        

}      

// duplicate all the attachments (of the case and related emails)

if (!AttachmentsToBeCreated.IsEmpty())

insert AttachmentsToBeCreated;  

// delete the original case and all it's related items

delete dupCase;

}

}