• Sven
  • NEWBIE
  • 35 Points
  • Member since 2008
  • Solution Architect
  • ABSI


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 42
    Replies
I am creating a workflow in "Build a Battle Station App ", but I am getting an exception which is as follows:
User-added image

However, this workflow is showing desired result in dev environment.
Kindly help
Can i modify the formula type to input type.is there any way
Hi All,

Can anyone help me out how to create a VFPage as a popup?

Right now, I know that VFPage which I have created is opening up in a new window.
Instead, it should open as a popup.

Thanks in advance!!
Hi, 

I am using custom setting for using number value in trigger and incrementing that value.
I  am getting value like 1,2,3........ but i want the values like 001,002,003......

Can any one one help me out for this.


Regards,
Sarvesh.

Hi

I want to include live agent to my custom app.
Secondly ,I want to have a chat option on home page of  any cutomer login and agent chat window on home page of agent login

As of now I have created a visual force page to start a live agent chat service as a new tab :chat service" which is opening a html file whcih we have generated after configuring live agent, however i want that online and offline buttoon on my home screen.

Can anyone can help.

 

Hi,

I have the following class for which i have written the test class which covers only 66% , not able to figure out how to cover t he rest 

Controller :

public with sharing class AF_FrozenUserExtension {

   private List<User> frozenUsers {get; set;}
   private Map<String,User> userMap = new Map<String,User>();
   private Map<String,List<Task>> usrTaskMap = new Map<String,List<Task>>();
   private Map<String,List<Opportunity>> usrOppMap = new Map<String,List<Opportunity>>();
   private Map<String,List<Threat__c>> usrThrtMap = new Map<String,List<Threat__c>>();
   public List<FrozenUser> frozenUserList{get; set;}

  
    public AF_FrozenUserExtension() {
    }
   
    public Class FrozenUser{
        public String UserId{get;set;}
        public String usrName{get;set;}
        public Integer taskCount{get;set;}
        public Integer oppCount{get;set;}
        public Integer thrtCount{get;set;}
       
        public FrozenUser(String UserId,Integer taskCount,Integer oppCount,Integer thrtCount,String usrName){
            this.UserId = UserId;
            this.taskCount = taskCount;
            this.oppCount = oppCount;
            this.thrtCount = thrtCount;
            this.usrName = usrName;
        }
    }
    public void getFrozenUsers(){
   
        frozenUsers = new List<User>();
      for (User u : [SELECT Id,LastModifiedDate ,Name FROM User WHERE Id in (Select userId  From UserLogin WHERE IsFrozen = TRUE) AND IsActive=true]) {
         frozenUsers.add (u);
         userMap.put(u.Id,u);
          }
  
      
       //logic to display the open tasks
       for(Task tsk: [SELECT ownerId FROM Task WHERE  Status!='Completed' AND OwnerId in :userMap.keySet()])
       {
            if(usrTaskMap.containsKey(tsk.ownerId)){
                usrTaskMap.get(tsk.ownerId).add(tsk);
            }
            else{
                List<Task> tskList = new List<Task>();
                tskList.add(tsk);
                usrTaskMap.put(tsk.ownerId,tskList);
            }
       }
      

      
       //logic to display open opportunity
       for(Opportunity op :[SELECT ownerId FROM Opportunity WHERE  StageName NOT IN ('Closed Won', 'Closed Lost') AND OwnerId in :userMap.keySet()])
       {
            if(usrOppMap.containsKey(op.ownerId)){
                usrOppMap.get(op.ownerId).add(op);
            }
            else{
                List<Opportunity> opList = new List<Opportunity>();
                opList.add(op);
                usrOppMap.put(op.ownerId,opList);
            }
       }

      
      //logic to display open threats
       for(Threat__c thrt: [Select ownerId from Threat__c where Status__c NOT IN ('Closed Won', 'Closed Lost')AND OwnerId in :userMap.keySet()])
       {
            if(usrThrtMap.containsKey(thrt.ownerId)){
                usrThrtMap.get(thrt.ownerId).add(thrt);
            }
            else{
                List<Threat__c> thrtList = new List<Threat__c>();
                thrtList.add(thrt);
                usrThrtMap.put(thrt.ownerId,thrtList);
            }
       }
      
        if(frozenUsers != null && frozenUsers.size() >0){
            FrozenUser frnzUsr;
            frozenUserList = new List<FrozenUser>();
           
           
            for(User usr: frozenUsers)
            {
                Integer taskCount =0,oppCount=0,thrtCount=0;
                if(usrTaskMap.containsKey(usr.Id)){
                    taskCount = usrTaskMap.get(usr.Id).size();
                }
                if(usrOppMap.containsKey(usr.Id)){
                    oppCount  = usrOppMap.get(usr.Id).size();
                }
                if(usrThrtMap.containsKey(usr.Id)){
                    thrtCount = usrThrtMap.get(usr.Id).size();
                }
               
                frnzUsr = new FrozenUser(usr.Id,taskCount,oppCount,thrtCount,usr.Name);
                frozenUserList.add(frnzUsr);
            }
        }
     
  }
 
  }


Test Class :

/**
*
*/
@isTest


private class Test_FrozenUserExtension {
static testMethod void myUnitTest() {
AF_FrozenUserExtension frozenusers = new AF_FrozenUserExtension();
frozenusers.getFrozenUsers();
}
}

I have called the method getFrozenUsers() directly with my class instance which covers the major portion, not sure how to cover the above part.

Help me on this regard

Thanks in Advance
I currently only have a standard developer edition for sanbox and not the developer pro. I would like to refresh the sandbox and import the data from production for testing purposes. What is the best way to do this? Should I use Talend? create the mapping and the rules. Can I potentially use the weekly scheduled and the current job I create and change the mapping to naother file later on and the file/folder with the cvs of Salesforce objects backup will be updated weekly? Or should I use Data loader ot do this? I know validations need to be turned off, is there a way this can be done without turning the validations off (perhaps through talend). 
Hi Everybody,

I am user and I have created a custom object (Test) which contains (name ,phone number and email fields)and the records inside the test object only visible to the my team leader and his manager..other user,leader and manager cannot view those record in test objects
Can anyone tell me how to do that??

Thanks in advance
Karthick
Hi there,

I have an professional edition account. I want to uninstall a package but unable to uninstall because of there are dew jobs in queued status & it doesn't allow to uninstall the package. I also check scheduled jobs but there are no one jobs available which was in queue status, so i can not delete or abort therse jobs. Created a case with salesforce support but developement support is available only for premium customers. Can anyone please help me to abort or delete the jobs. Its urgent for us.

Thanks & regards,

Amit N. Bhandarkar
Im also trying to use "aura" widget and I get this message:

Aura Integration Service Error

[{"message":"Erro interno do servidor
ID do erro: 1975403014-51130 (1511887290)"}]

Im trying to setup up a Self-service customer community based on: https://help.salesforce.com/help/pdfs/en/community_templates.pdf
Hello,

I am working on a mule flow that use a salesforce connector.

My question is that how to define a lookup relationship when using this connector when doing a bulk upsert (job list in Bulk Data Load Jobs)

The salesforce connector is using the https://test.salesforce.com/services/Soap/u/28.0 api.
My problem is that on my object I have a lookup and the upsert is working only if I use for this field the sfObjectId of the lookup object.

I would like to be able to use the externalId of my lookup object instead, but can't find the correct xml expression for it.


Hi,

 

I created an Apex rest service where i call some custom objects data. This rest service should be called by a High volume customer portal user. But when i do that then i always get the message "You do not have access to the Apex class named: PrRestService","errorCode":"FORBIDDEN"

 

I changed already some security settings on that class but until now no success, i added the profile of the portal user to that apex class but id doesn't help. The only thing that works is adding that class in the public settings of the site.

 

But then its public available and i don't want that. The standard security options should apply.

 

Do i need to change some other security settings to accomplish this?

 

Thanks

 

Sven

How can we  get the current application name in vf page using controller.

Hi friends,

I have created a object Job in my developer org, written a trigger to avoid Duplicate Record Name,and it is working fine in case of duplicate case insensitive record Name,
for example -:
i have created a Job with Name -->  JOB
next time if I try to create new job with Name JOB I will get an error message "Duplicate Job Name" , that means it is working fine.

 

but if I try to use case sensitive record say job , it will throw an error "Attempt to de-reference a null object", How to fix this issue.

 

i am using this link for Trigger.

Trigger to avoid duplicate lead email

 

here is my code,

 

trigger AvoidDuplicateJobName on Job__c(before insert, before update) 
{

    Map<String, Job__c> jobMap = new Map<String, Job__c>();
    for (Job__c job : System.Trigger.new) 
    {
 
        if ((job.Name != null) && (System.Trigger.isInsert || (job.Name != System.Trigger.oldMap.get(job.Id).Name))) 
        {
            if (jobMap.containsKey(job.Name)) 
            {
                job.Name.addError('Another new Job has the '+ 'same Name.');
            }
            else 
            {
                jobMap.put(job.Name, job);
            }
       }
    }
    
    for (Job__c job : [SELECT Name FROM Job__c WHERE Name IN :jobMap.KeySet()])
    {   
     
        Job__c newjob = jobMap.get(job.Name);
        newjob.Name.addError('A Job with this Name '+ ' already exists.');
       
    }
}

 

 

I need some help. I can not get salesforce to access an external web service.  I have added the endpoint thru Remote Site Settings and generated the APEX Classes from the wsdl using wsdl2apex.  I have added a button to the opportunity to activate the web service.  When I press the button I get the following error.

 

A problem with the OnClick JavaScript for this button or link was encountered:

 

{faultcode:'soapenv:Client', faultstring:'No operation available for request {http://soap.sforce.com/schemas/package/agilewebservices}AgileWebservices.AddFolder, please check the WSDL for the service.',}

 

What am I missing?  I can access the webservice internally using soapUI 3.6 so I know the service works.

  

Here is the generated Apex Class:

 

//Generated by wsdl2apex

public class agilewebservices {
    public class x_E_S_01843S_ServicesSOAPSOAP11Document_E_S_01843S_Services {
        public String endpoint_x = 'https://websvcs01.test1.embarq.com:443/E/S/01843S/Services';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://AgileWebservices', 'agilewebservices', 'http://AgileWebservices/AbstractTypes', 'agilewebservicesAbstracttypes'};
        public agilewebservices.LLDocument AddFolder(String user_x,String password,String folderName,Integer objectid) {
            agilewebservices.AddFolder_element request_x = new agilewebservices.AddFolder_element();
            agilewebservices.AddFolderResponse_element response_x;
            request_x.user_x = user_x;
            request_x.password = password;
            request_x.folderName = folderName;
            request_x.objectid = objectid;
            Map<String, agilewebservices.AddFolderResponse_element> response_map_x = new Map<String, agilewebservices.AddFolderResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://AgileWebservices/AddFolder',
              'http://AgileWebservices',
              'AddFolder',
              'http://AgileWebservices',
              'AddFolderResponse',
              'agilewebservices.AddFolderResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.AddFolderResult;
        }
    }
    public class LLDocument {
        public String DocumentName;
        public Integer ObjectID;
        private String[] DocumentName_type_info = new String[]{'DocumentName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] ObjectID_type_info = new String[]{'ObjectID','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://AgileWebservices','true','false'};
        private String[] field_order_type_info = new String[]{'DocumentName','ObjectID'};
    }
    public class AddFolderResponse_element {
        public agilewebservices.LLDocument AddFolderResult;
        private String[] AddFolderResult_type_info = new String[]{'AddFolderResult','http://AgileWebservices','LLDocument','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://AgileWebservices','true','false'};
        private String[] field_order_type_info = new String[]{'AddFolderResult'};
    }
    public class AddFolder_element {
        public String user_x;
        public String password;
        public String folderName;
        public Integer objectid;
        private String[] user_x_type_info = new String[]{'user','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] password_type_info = new String[]{'password','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] folderName_type_info = new String[]{'folderName','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] objectid_type_info = new String[]{'objectid','http://www.w3.org/2001/XMLSchema','int','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://AgileWebservices','true','false'};
        private String[] field_order_type_info = new String[]{'user_x','password','folderName','objectid'};
    }
}

 

Here is the button code:

 

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")}
var myvar = sforce.apex.execute("agilewebservices","AgileWebservices.AddFolder", {user_x:"lapispw",password:"lapispw",folderName:"Mikes Third Test - 00000003",objectid:25953});
window.alert(myvar);

 

Hi all ! How to convert below code to apex! logic please...........

 

<oas:UsernameToken>
<oas:Username>test</oas:Username>
<oas:Password Type=>test</oas:Password>
<oas:Nonce>test</oas:Nonce>
<oas1:Created>12:00</oas1:Created>
</oas:UsernameToken>

 

gets its values from the data generated in test.cs , please convert this logic to APEX.

Hi,

 

We are trying to implement SSO in our org, we are able to put salesforce as IDP and connect it to other SP (php based) using simplesamlPHP. But we are not able to retrieve any customer portal user to be authenticated.

 

Is it possible to authenticate customer portal user with Salesforce as IDP? Currently, we only able to authenticate salesforce standard user.

 

I am already following this guideline:

https://login.salesforce.com/help/doc/en/identity_provider_enable.htm

https://login.salesforce.com/help/doc/en/service_provider_define.htm

choose all of customer portal profiles, but it still cannot get authenticated

 

 

Is there other configuration that I have to do or missed?

 

Thanks,