• Andreas Meyer
  • NEWBIE
  • 114 Points
  • Member since 2014

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 23
    Replies
Hi,

I have a record with more than 100 fields. I want to copy all field values into another existing record and update. Is there any method to update?

Thanks.
 
When the user clicks link on his email it opens up a site/ VF page & on that first page I want the pop to show immediatly without the user clicking a button. The popup works but the problem is you have to click the button first before it shows.

I got the code from here http://www.salesforcegeneral.com/salesforce-modal-dialog-box/
Hi,

I need help to combing my 2 trigger to the first one


Not sure how to combine both 


MY FIRST TRIGGER :

trigger AF_Approval on AccountExceptions__c (before insert) {
  
    List<Id> accId = new List<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           accId.add(spl.Account__c);
  
    }
    // Soql Account Team member to get the User ID
      
   List<AccountTeamMember>  RegularDOS = [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  growthDos =  [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Growth DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  RVPUsers =   [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance RVP' AND AccountId =:accId LIMIT 1];
   RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account'];
           
  //Id profileId=userinfo.getProfileId();
   User u = AF_DealerCRM_Utility.getUserInfo();
   
   
   String profileName= u.Profile.Name;

    List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
    for (AccountExceptions__c myobj : trigger.new)
    {
   
       if(myobj.Account__r.RecordTypeId != rtypes.Id) {
        if(profileName=='AF: Sales Specialist' && growthDos.size() > 0){
            myobj.DOSUser__c= growthDos[0].UserId;
        }
       
       else if(profileName=='AF: Sales Specialist' && growthDos==null && RegularDOS.size() > 0)
        {
           myobj.DOSUser__c= RegularDOS[0].UserId ;
        }
       
       
        else if( RegularDOS.size() > 0)
        {
            myobj.DOSUser__c=  RegularDOS[0].UserId ;
           
        }
    
          if(RVPUsers.size() > 0){
         myobj.RVP_Approver__c=  RVPUsers[0].UserId ;
         }
         }
        
        
         if(myobj.Total_Amount_of_Current_Exception__c>20000)
         {
         myobj.Executive_Approval_Reasons__c='Exception Value > $20K';
         }
        
    }

}

My Second Trigger that i want to combine to first trigger :


trigger AF_RVP on AccountExceptions__c (after insert) {
List<Id> rvpId = new List<Id>();
Set<Id> adrId = new Set<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           rvpId.add(spl.DOSUser__c);
           rvpId.add(spl.Account__c);
           adrId.add(spl.Id);
    }
  
   
RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account' limit 1];
User RVPUsers =[SELECT Name, ManagerID, Manager.Name FROM User WHERE Id = :rvpId LIMIT 1];
List<AccountExceptions__c> adrExpList = [Select Id,RVP_Approver__c,Account__c,Account__r.RecordTypeId From AccountExceptions__c Where Id IN :adrId];
 
List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
for (AccountExceptions__c obj : adrExpList)
{
if(obj.Account__r.RecordTypeId == rtypes.Id) {
obj.RVP_Approver__c=  RVPUsers.ManagerID;
}   
}

update adrExpList;
}

help me how to combine both of them please


Its possible to do this or same:

Thank you
String min='00';
String heu ='17';
String jMois='?';
String leMois='*';
String jSemaine ='[WED]';
String email = 'sggdfgdfgd@ggg.com';
String req='select Name from contact';


BBBB p = new BBBB(email , req, heu, min, jMois, leMois,jSemaine);  
String complete = p;

Hi All,
currently i am in a evaluation process of connecting Voice/ACD with the new SFDC Omni-Channel feature. 

The ACD provider will be integrated using OpenCTI. Indeed OpenCTI exists in the CallCenter console component of the ServiceConsole. Usually the ACD provider takes care of the call routing and the only interaction with SFDC is done in context of the OpentCTI HTML/JavaScript code (inbound and outbound calls, call logging etc.). This HTML/JavaScript code is always running in context of the browser of a particular agent. The session between the agent and the ACD server is handled by the CallCenter console component (pure Cloud solution) or some kind of local desktop app as a middleware between the CallCenter console component and the ACD server.

I have an ongoing discussion with SFDC about there recommendation to integrate OpenCTI with Omni-Channel to make sure the Omni-Mechanism will manage the Agent-Blending completely on SFDC side.

SFDC suggest to let the ACD system create a Case … which will be handled by a Omni-Service channel. A Omni routing configuration assigned to a queue will route that case to an agent. As soon as an agent picks that case from the Omni console component the ACD is notified via SFDC streaming API to connect the pending call with the agent who accepted the case. In fact the ACD server is the only subscriber of the StreamingAPI PushTopic.

I have a fundamental problem to understand that approach:
1. from my understanding OpenCTI only runs in context of a client browser … to create a case outside that context, OpenCTI needs to connect to SFDC in a different way. That was the old CTI way … OpenCTI tries to get rid of that!

2. StreamingAPI cannot connect to server side processed outside of SFDC (like a server run by a ACD provider), again: the only way is to notify the OpenCTI console component via Javascript events fired by service console integration toolkit. 

Does anyone ever did such an implementation or found any kind of best practice documents coming from SFDC?

Before you ask: we have a running ServiceCloud implementation (1000+ agents) using OpenCTI in the „classic way“ for a couple of years now. Moreover we have a new PoC using Omni-Channel for Email,Web and LiveAgent in place. The missing piece is to connect OpenCTI and Omni and let Omni do the call routing instead of the ACD provider.

Thanks for any kind of inspiration 

Best,
Andreas
I like to do some additional calculation if the entitlement process is writing the Case.SlaExitDate field. Unfortunately the Case trigger won't fire if the entitlement process writes this field. Even in Case trigger UPDATE AFTER the SlaExitDate field is still null (i do a status change to "close" for that case, which is the stop criteria for the entitlement process as well, no milesstones are in the process). If i show the case again the SlaExitDate is set. So it seems that the update of that field done by the entitlement process happens outside any trigger context.
Any ideas?
Hello guys, I'm having trouble creating a case via live agent. Follows the code I am using. If anyone can help, thank you.
<input type="hidden" name="liveagent.prechat:caseOrigin" value="Chat" /> 
<input type="hidden" name="liveagent.prechat.findorcreate.map:Case" value="Origin,caseOrigin;" /> 
<input type="hidden" name="liveagent.prechat.findorcreate.map.doCreate:Case" value="Origin,true" /> 
<input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Case" value="Case" /> 
<input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Case" value="true" /> 
<!-- Link the Contact to the Case -->
<input type= "hidden" name="liveagent.prechat.findorcreate.linkToEntity:Account" value="Case,AccountId" />
Hi All,
currently i am in a evaluation process of connecting Voice/ACD with the new SFDC Omni-Channel feature. 

The ACD provider will be integrated using OpenCTI. Indeed OpenCTI exists in the CallCenter console component of the ServiceConsole. Usually the ACD provider takes care of the call routing and the only interaction with SFDC is done in context of the OpentCTI HTML/JavaScript code (inbound and outbound calls, call logging etc.). This HTML/JavaScript code is always running in context of the browser of a particular agent. The session between the agent and the ACD server is handled by the CallCenter console component (pure Cloud solution) or some kind of local desktop app as a middleware between the CallCenter console component and the ACD server.

I have an ongoing discussion with SFDC about there recommendation to integrate OpenCTI with Omni-Channel to make sure the Omni-Mechanism will manage the Agent-Blending completely on SFDC side.

SFDC suggest to let the ACD system create a Case … which will be handled by a Omni-Service channel. A Omni routing configuration assigned to a queue will route that case to an agent. As soon as an agent picks that case from the Omni console component the ACD is notified via SFDC streaming API to connect the pending call with the agent who accepted the case. In fact the ACD server is the only subscriber of the StreamingAPI PushTopic.

I have a fundamental problem to understand that approach:
1. from my understanding OpenCTI only runs in context of a client browser … to create a case outside that context, OpenCTI needs to connect to SFDC in a different way. That was the old CTI way … OpenCTI tries to get rid of that!

2. StreamingAPI cannot connect to server side processed outside of SFDC (like a server run by a ACD provider), again: the only way is to notify the OpenCTI console component via Javascript events fired by service console integration toolkit. 

Does anyone ever did such an implementation or found any kind of best practice documents coming from SFDC?

Before you ask: we have a running ServiceCloud implementation (1000+ agents) using OpenCTI in the „classic way“ for a couple of years now. Moreover we have a new PoC using Omni-Channel for Email,Web and LiveAgent in place. The missing piece is to connect OpenCTI and Omni and let Omni do the call routing instead of the ACD provider.

Thanks for any kind of inspiration 

Best,
Andreas
Hi,

I have a record with more than 100 fields. I want to copy all field values into another existing record and update. Is there any method to update?

Thanks.
 
Hi..I am part of an organization which has lot of applications under it. I am working on only couple of applications (in 100s of applications under that organization). How can I download only my applications code in Force.com IDE? When I provide my credentials, I see all the applications code is downloaded. Is there any folder structure maintained for each application? I would like to select folder rather than selecting individual file of my application. This way I can have my IDE synced with any new files created for that application.
Hi All,

  I have created a custom object. Whenever we create a record, by using Notes & Attachments I'm attaching a pdf file to it. Now my requirement is, whenever user attaches a PDF file to a record, on the backend I need to run a process which will convert the attachment into PDF stream and send to third party system. 

  Can anyone help me on this like how can i apparoch to it !!!
When the user clicks link on his email it opens up a site/ VF page & on that first page I want the pop to show immediatly without the user clicking a button. The popup works but the problem is you have to click the button first before it shows.

I got the code from here http://www.salesforcegeneral.com/salesforce-modal-dialog-box/
Hi,

I need help to combing my 2 trigger to the first one


Not sure how to combine both 


MY FIRST TRIGGER :

trigger AF_Approval on AccountExceptions__c (before insert) {
  
    List<Id> accId = new List<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           accId.add(spl.Account__c);
  
    }
    // Soql Account Team member to get the User ID
      
   List<AccountTeamMember>  RegularDOS = [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  growthDos =  [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Growth DOS' AND AccountId =:accId LIMIT 1];
   List<AccountTeamMember>  RVPUsers =   [SELECT UserId, TeamMemberRole, Id, AccountId  FROM AccountTeamMember  WHERE TeamMemberRole= 'Management Team - Auto Finance RVP' AND AccountId =:accId LIMIT 1];
   RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account'];
           
  //Id profileId=userinfo.getProfileId();
   User u = AF_DealerCRM_Utility.getUserInfo();
   
   
   String profileName= u.Profile.Name;

    List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
    for (AccountExceptions__c myobj : trigger.new)
    {
   
       if(myobj.Account__r.RecordTypeId != rtypes.Id) {
        if(profileName=='AF: Sales Specialist' && growthDos.size() > 0){
            myobj.DOSUser__c= growthDos[0].UserId;
        }
       
       else if(profileName=='AF: Sales Specialist' && growthDos==null && RegularDOS.size() > 0)
        {
           myobj.DOSUser__c= RegularDOS[0].UserId ;
        }
       
       
        else if( RegularDOS.size() > 0)
        {
            myobj.DOSUser__c=  RegularDOS[0].UserId ;
           
        }
    
          if(RVPUsers.size() > 0){
         myobj.RVP_Approver__c=  RVPUsers[0].UserId ;
         }
         }
        
        
         if(myobj.Total_Amount_of_Current_Exception__c>20000)
         {
         myobj.Executive_Approval_Reasons__c='Exception Value > $20K';
         }
        
    }

}

My Second Trigger that i want to combine to first trigger :


trigger AF_RVP on AccountExceptions__c (after insert) {
List<Id> rvpId = new List<Id>();
Set<Id> adrId = new Set<Id>();
    for(AccountExceptions__c spl:trigger.new)
    {
           rvpId.add(spl.DOSUser__c);
           rvpId.add(spl.Account__c);
           adrId.add(spl.Id);
    }
  
   
RecordType  rtypes = [SELECT Name, id FROM RecordType WHERE isActive=true AND SobjectType='Account'AND Name = 'Group Account' limit 1];
User RVPUsers =[SELECT Name, ManagerID, Manager.Name FROM User WHERE Id = :rvpId LIMIT 1];
List<AccountExceptions__c> adrExpList = [Select Id,RVP_Approver__c,Account__c,Account__r.RecordTypeId From AccountExceptions__c Where Id IN :adrId];
 
List<AccountExceptions__c> oppts = new List<AccountExceptions__c>();
for (AccountExceptions__c obj : adrExpList)
{
if(obj.Account__r.RecordTypeId == rtypes.Id) {
obj.RVP_Approver__c=  RVPUsers.ManagerID;
}   
}

update adrExpList;
}

help me how to combine both of them please


Hi,

I have requirement to read csv file using Batch Apex without using VF page.
Could you please anyone help me with Batch Apex code.

Thanks and Regards,
Ramesh
hi
i want to create one alert message with ok button in existing visualforce page and i need to use that message
in a perticullar method of exisiting controller[apex classes]
For example
i am having visualforce page named as 'visitWarning'. In that i need to add a code to create alert message with ok button and i should call this alert in AbilityChecking() method [this method occured in my VisitAlertController Class]
Code Example :
Page
VisitWarning

<apex:page standardController="Visits__c"  extensions="VisitAlertPageController" >
 <apex:outputPanel layout="block" style="overflow:auto;height:100px" >
 <apex:pageMessages />
 </apex:outputPanel>
</apex:page>
Apex classes

public class VisitAlertPageController {
.....
......
......

public void VisitScheduledAbility(){
.........
..........
if((currentVisit.Type__c =='Hello' )
{
// I should call the alert here
}
}

}


I have a text field which saves query like:-

SELECT Id FROM Object WHERE fieldA = TRUE and fieldB = null

Now, based on some other fields on which user provides input, I need to parse the query, remove some of the fields from where clause and add some other.. Can someone please help me in breaking down the query saved in a text field to smaller parts. The keywords 'Where', 'and' and 'Limit' will always be there in the query.

I have created a trigger on Task Object and test that trigger .the code coverage is 100%

but when i am deploying that trigger its thowing error like other test class code coverage iss failuer

error

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Trigger_Task_Send_Email: execution of AfterInsert caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Missing target address (target, to, cc, bcc): [] Trigger.Trigger_Task_Send_Email: line 73, column 1: []
Stack Trace: Class.testSendkycEmail.teSendkycEmail: line 11, column 1



how to solve this
Can any one help how to write controller code for below question on VF pagehaving radio buttons to store value as picklist in object. Question is below

Have you Served as Manager
Radio buttons
Yes
No

In application the quuestion has picklist Yes and NO. Can some one help how the controller should be written to svae a radio button selected option on VF page to save as picklist in Object.
I have changed the sharing rules on various records and the role structure for my organisation, but now users are unable to edit cases, change status or owner; or email from the case.

The error message that users see on the screen is:
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger ShareUserPermission caused an unexpected exception, contact your administrator: ShareUserPermission: execution of AfterUpdate caused by: System.SObjectException: Field is not writeable: CaseShare.CaseAccessLevel: Trigger.ShareUserPermission: line 16, column 1

I also receive an email as below:
**
Apex script unhandled trigger exception by user/organization: 005900000010qIR/00D90000000iHod
ShareUserPermission: execution of AfterInsert
caused by: System.SObjectException: Field is not writeable: CaseShare.CaseAccessLevel
Trigger.ShareUserPermission: line 16, column 1
**

I think the issue is similar to this:
https://help.salesforce.com/apex/HTViewSolution?id=000149002&language=en_US

But I have no idea how to resolve it. Help!
Firstly let me start out by saying that I am very new to salesforce. I am learning it as I go and only have about 2 weeks of experience so far. The issue that I have is with adding a signature field to a VF page. The page is essentially one large apex:form, and I am trying to use an app called EZSign to add the signature. The issue I am running into is that the app apparently uses an apex:form as well, since I get a "nested apex:form" error when I add the tag to call/display the signature field. I have it setup now so that once the main form has been filled out and the save button is clicked it is redirected to a seperate page that lets you sign, and saves to the original custom object. It works, but it's not pretty. Is there any way to reference and/or display the signature via a component or other feature I am unaware of? The code below is a very simple mockup of what I need to work.

<apex:page>
  <apex:form>
    <html>
      <body>
        <signature> // this references a component that contains an apex:form, and to my knowledge the code for it cannot be edited directly
      </body>
    </html>
  </apex:form>
</apex:page>
Need to write the custom logic in the controller.
IF VF page like radio buttons or mutli checkboxes: capture the values in the controller.

the record has picklist and mutiselect picklist : compaire the values with the existing values and assign the appropirate values at the data base level.

Example : mutli checkboxes 1,2,3 are the selected values then in the controller process these values as 1;2;3 and assign it to mutiselect picklist

Can some one help me how to write code
I like to do some additional calculation if the entitlement process is writing the Case.SlaExitDate field. Unfortunately the Case trigger won't fire if the entitlement process writes this field. Even in Case trigger UPDATE AFTER the SlaExitDate field is still null (i do a status change to "close" for that case, which is the stop criteria for the entitlement process as well, no milesstones are in the process). If i show the case again the SlaExitDate is set. So it seems that the update of that field done by the entitlement process happens outside any trigger context.
Any ideas?
How to pass id using the console functon "sforce.console.getFocusedPrimaryTabObjectId()" to a controller.
I'm getting the same on the javascript. But cannot pass. Tried using hiddenfield and actionfunction.
javascript:
function testGetFocusedPrimaryTabObjectId() {
            sforce.console.getFocusedPrimaryTabObjectId(showObjectId);
        }
        var showObjectId = function showObjectId(result) {
            //Display the object ID
            invokeController(result.id);
            alert('Object ID: ' + result.id);
        };

page:
<apex:actionFunction name="invokeController" action="{!save}" reRender="outtext">
            <apex:param value="{!primeTabValue}"/>
        </apex:actionFunction>
this is my code and in controller am using get; set; for the primeTabValue variable.

Am able to get the id on alert box. but not on the variable.

Any help would be much appreciated.


  • March 06, 2014
  • Like
  • 1
I have used pop to visualforce page in softphone layout. My custom vf page is popping in the new tab of service console. But I am not able to get the ANI(Caller number) value in apex controller.
It was available in old version of CTI but in open CTI I am not able to get ANI. Please suggest.

Hi,

 

I am calling a method from my controller every 5 seconds.

But I want to dynamically change the interval by adding a custom setting and calling the custom setting in apex class and

referring that in the interval attribute of actionpoller.

 

But when I tried that, the method is not getting called every 5 seconds. It is taking the default interval as 60 seconds.

 

I also tried by creating an Integer variable in the controller and called that in the interval attribute of actionpoller.

 

Following is my code which I am trying:

public class exampleCon {
    Integer count = 0;
     Integer interval=5;                   
    public PageReference incrementCounter() {
        count++;
        return null;
    }
    public Integer getinterval(){
        return interval;
    }                 
    public Integer getCount() {
        return count;
    }
}

 

<apex:page controller="exampleCon">
    <apex:form >
        <apex:outputText value="Watch this counter: {!count}" id="counter"/>
        <apex:actionPoller action="{!incrementCounter}" rerender="counter" interval="{!interval}"/>
    </apex:form>
</apex:page>

 

 

Please let me know any suggestions.

 

Thanks

Arvind