Posts

Showing posts from July 2, 2016

Open Service Console tab and Salesforce Classic using JavaScript on Custom Button in Salesforce

Requirement: Need to create a custom button on detail page, when click on it open in new tab in service console apps and salesforce classic Solutions: if (typeof(srcSelf) == 'function') {  // This is for Console app srcSelf('URL&isdtp=vw');  }  else {  // This is for salesforce classic window.open('URL');  } Notes: isdtp=vw : this is hide sidebar in consolse app URL  = '/500/e?CF00NN0000001i1d6={!MergeFieldAPINAME}&CF00NN0000001i1d6_lkid={!MergeFieldAPINAME}&ent=Case' In case of any issue please feel free call to me Thanks, Sumit Shukla skypeID : shuklasumit1 sumitshukla.mca@gmail.com Mob: 9711055997

Case Assignment Using Apex Code

Requirement: When Case will insert using apex code assignment check box should be true. Solution: List<Case> lstofCase = new List<Case>(); Case objCase = new Case();   ObjCase.status="New"; lstofCase.add(ObjCase); Insert lstofCase;  Database.DMLOptions dmo = new Database.DMLOptions();   dmo.assignmentRuleHeader.useDefaultRule = true;    system.debug(' dmo.assignmentRuleHeader.useDefaultRule***'+ dmo.assignmentRuleHeader.useDefaultRule);  Database.update(lstofCase, dmo);   Thanks, Sumit Shukla mob: 9711055997 skypeID: shuklasumit1 email ID: sumitshukla.mca@gmail.com