• 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
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,

 

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

  • April 10, 2012
  • Like
  • 0

HI All,

 

We are using Salesforce as IdP and we enabled also the Single Sign-on settings in Salesforce. Now we want to use Heroku and Play! to access Salesforce and the Play! application is the service provider.

 

This all works fine when using an internal salesforce user, but we want to use this functionality with a customer portal user but how can we manage that.

 

I found a doc where it states that we need to add the portal_id and the organization_id to the saml assertion but we only have a saml request and the saml assertion comes from the identity provider i think.

 

Help would be appreciated.

 

thx Sven

  • March 08, 2012
  • Like
  • 0

Hi all,

 

I am wondering is it possible to disable a workflow via apex code?

a apex trigger or something like that.

 

Thx

 

Sven

  • January 26, 2011
  • Like
  • 0

Hi,

 

I was wondering if we could use something different then basic authentication.

 

If i do a post to an url using C# with this example

 

String usern = "test"; String passw = "test"; myReq.Credentials = new NetworkCredential(usern, passw); myReq.PreAuthenticate = true; myReq.Method = "POST";

 then the post works fine.

 

If i use the same url but do the authentication using the examples found in the docs then i get an access denied.

 

Apex code

 

 

String username = 'test'; String password = 'test'; Blob headerValue = Blob.valueOf(username+':'+password); String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue); req.setHeader('Authorization', authorizationHeader);

 

 So i think the server does not use Basic authentication (i don't have access to the server).

 

What is the difference between the 2 methods and can i do authentication like the C# example in Salesforce?

 

Thanks for your help

 


 

  • April 21, 2009
  • Like
  • 0
Hi,

We have a visualforce edit page on a custom object that is related to the case object.
if you use the standard save button - when you save the custom object it always returns to the cases view page.

because we still have to do some functionality on the custom object after the save, we overridden the save button with below code. this does the save but remains on the custom objects detail view.

Now this functionality worked fine before but now it does not work anymore (maybe winter '09) on a user with limited rights. if we change a setting on the profile "author apex" then it works again but then the users has to many rights to modify and delete records.


Code:
 public PageReference saveobj() {
     standardController.save();
        this.obj = (obj__c)standardController.getSubject();         
        return new PageReference('/'+ obj.Id);     
    } 

So we would like to keep our profile limited but the code has to keep working offcourse.
Any help would be great

Thx
Sven



  • October 22, 2008
  • Like
  • 0
Hi all,

this is not really a developer question but i don't know where to post this one.

We have an email2case running on an exchange server mailbox. Sometimes we receive emails to our support help desk where the e2c tool is running on from different countries with different encodings. No the problem is that those emails are not readable in the description of the case. we already tried different things out but where not able to resolve this issue.
If we sent the same emails on a gmail account then the case are correctly created (readable).

Did somebody had this problem before and was able to resolve this because running on a gmail box is not an option.

Thanks

Sven
  • October 02, 2008
  • Like
  • 0
Hi,

I have a visualforce page and a controller
in the visualforce page i have some inputfields and a selectlist an an datatable with some records if we click on a record in the datatable the inputfields are populated with the data from the datatable. Now the problem is that the selectlist gets only populated ones, the second time the value does not change.

example:
selectlist with salutation
<apex:selectList id="contactSalutation" value="{!salutation}" size="1" >
            <apex:selectOption itemValue="" itemLabel="Choose Salutation"/>
            <apex:selectOption itemValue="DHR" itemLabel="DHR"/>
            <apex:selectOption itemValue="FR" itemLabel="FR"/>
            <apex:selectOption itemValue="HR" itemLabel="HR"/>
            <apex:selectOption itemValue="HRN" itemLabel="HRN"/>
            <apex:selectOption itemValue="M" itemLabel="M"/>
            <apex:selectOption itemValue="MEV" itemLabel="MEV"/>
            <apex:selectOption itemValue="MME" itemLabel="MME"/>
            <apex:selectOption itemValue="MR" itemLabel="MR"/>
            <apex:selectOption itemValue="MRS" itemLabel="MRS"/>
            <apex:selectOption itemValue="MS" itemLabel="MS"/>
        </apex:selectList>

if i click in the datatable on a record that has a salutation of MR then the selectlist changes to MR, if i then click in the datatable on a record with salutation MRS the selectlist keeps standing on the MR.

So i think the selectlist does not rerender correctly.

Has anybody any idea on how to resolve this issue.

Thanks for the help

Sven
  • August 26, 2008
  • Like
  • 0
Hi,
 
I'am stuck on a few lines of code that i need to test but i don't know how to test this.
is there anybody that could point me out in the good direction. because i don't find much info on how to test your code before deployment.
 

public PageReference updateRMA() {
if (success == true){
if (handshake == true){
rma = [Select r.Status__c,r.Support_Request__c From
RMA__c r where r.Id = :rmaid];
rma.RMAid__c = callnr;
rma.
Name = callnr;
update rma;

sr = [Select c.Status from Case c where c.id = :rma.Support_Request__c];
sr.Status =
'Transferred';
update sr;
}
}
return null;
}

 

Thanks for your help

  • August 22, 2008
  • Like
  • 0
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

  • April 10, 2012
  • Like
  • 0

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);

 

  • April 03, 2012
  • Like
  • 0

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,