• Srinu
  • NEWBIE
  • 125 Points
  • Member since 2011

  • Chatter
    Feed
  • 5
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 55
    Questions
  • 50
    Replies
Hello Guys,

Is Salesforce is disabling TLS 1.0 in Summer '16 upgrade?

We have all the information regarding TLS 1.0 disablement for non-prd sandboxes & PRD instances. But I wanted make sure once with you all since we are using Desktop CTI Adapter currenlty.
https://help.salesforce.com/apex/HTViewSolution?id=000221207

Thanks,
Srinu
  • May 12, 2016
  • Like
  • 0
Hello,

We have few reports in place and whenever user runs they are recieving the report details in email body. 

Can we send the details as an attachment?

Any suggestions how can we achieve this functionality by using any custom code?

Thanks,
Srinu
  • May 03, 2016
  • Like
  • 1
Hello,

We recently created one record type and page layout for case object. Upon case creation we wanted to fire Active assignment rules and by selecting the "Assign using active assignment rules" optional check box we are able to acheive it. Case is getting created successfully and assgned to Queue. 

But upon case EDIT also Assignment Rules are firing since we have selected 'Default' ceckbox for Assignment Rules on page layout level. That's the reason why AR are firing. We don't want AR firing upon case edit? What actions do I need to take to prevent this?

Any suggestions plz..

Thanks,
Srinu
  • February 25, 2016
  • Like
  • 0
Hello Everybody,

My client is using salsforce for case management. Agents will create cases for customers and they can send an email(with Attachment Ex: PDF File) from the case by selecting case customer as recepient. 

Recently we have heard from customer saying they can't access the attachment link which they've got recieved longtime back from the client. 

Is salesforce is preventing to access the Email Attachment Link after certain period of time? If so, Can we request salesforce not to do that by making some configerations for my clients sfdc org?

Any suggestions would be appreciated!

Thank You all !

Srinu
  • February 02, 2016
  • Like
  • 0
Hi Guys,

I am unable to pull the value from contact lookup field upon case creation. I am creating case as a community user and I belong to one region Account and trying to pull another region customer from the lookup. I can't see them. I can only see region related contacts. 

Do I need to setup more to see other region contacts as well?

Any suggestions?

 
  • December 15, 2015
  • Like
  • 0
Hi All,

I have a custom VF page and corresponding apex controller class and inserting the case by using a insert DML statement. User provides information on custom VF page and click save button. Case will be inserted. Upon this step case trigger code will be executed. 

I have a before insert section where am trying to populate values for couple of fields.
1. Entitlemnet Id(Lookup to Entitlement) - In debugs I can see value but not on the case.
2. Custome field  - Can see value in debugs as well on the case once it's created. 
Not sure why I can't see value on the case ?

I have a portal view & standard view in my salesforce org. Code/configerations are working fine in standard mode and not in portal mode. 

Any ideas?

Thanks,
Srinu
  • November 02, 2015
  • Like
  • 0
Hello,

I have existed VF page which is referenced to a custom tab on case details page. This is working fine in classic mode. 

When agents are working on cases in console mode upon clicking on the custom tab VF page is executing and directing back to console mode results softphone is disconnecting. 

If I can make page stay on console mode I think i'll be able to overcome this issue. Does anybody experience this issue?

Advance thanks for your help!

Thanks,
Srinu
  • September 29, 2015
  • Like
  • 0
Hi Guys,

my org is using desktop softphone adapter to answer calls by agents. 

Backgroung: I have a custom button on case detail page upon clicking on that VF page will opin in new tab. Issue is when Agents using console view they are using this VF page and it's dosconnets the Softphone. 

To prevent this, Do I need to add any code to my VF page to support console view?

Any suggestions much appreciated!

Thanks,
Srinu.
  • September 17, 2015
  • Like
  • 0
Hi,

I have created one entitlement process which has entry criteria & exit criteria for the SLA to be start and stop. 

Issue is: SLA is getting assigned upon case creation but it's not getting stoppped when the exit criteria happened on case. 

Case exits the process based on 'Custom Criteria when formula evaluates to true'. 

Question: The field which am referencing in custom formula is a PickList field and I would like to STOP the SLA based on one of the picklist values. But SLA is not getting stopped when I select the defined picklist values from the drop down on the case detail page.Not sure whether it's wrong with my formula field OR something other?

Please guide me with your thoughts!

Thanks,
Srinu
  • August 10, 2015
  • Like
  • 0
Hi Guys,

When an agent opens an attachment, it's opening in a 'Protected mode' and by clicking on the 'Enable Editing' button user should be able to open & Print the file. But it's not happening, when user clicks on 'Enable Editing' button file is becoming and empty file. Not sure what causing this issue. Did anyone experienced same issue before? 

Can anyone suggest what might causing this issue ? Does this related to SFDC or it's something to do with Microsoft Word?

Thanks,
Srinu
  • July 27, 2015
  • Like
  • 0
Hello,

I have create a WF rule on case comment object(to send an email alert), which is trying to find out which profile user has created this comment. I created in DEV sandbox and it's working fine. So I moved to PRD and it's giving below error upon validating the change set. 

Field CreatedBy.Profile.Name is inaccessible. Please review all fields referenced by the formula. Context: core.WorkflowFormulaContext

Please let me know if you have any suggestions. 

Thanks,
Srinu
  • July 06, 2015
  • Like
  • 0
Hi folks,

How can we prvent the user not to select the 'Public' checkbox while creating a case comment for few type of cases?

I know we can show an error message upon selecting 'Public' checkbox by creating a trigger on case comment object. 

But I am wondering is there any way to disable, or grayout, the public checkbox so that it cannot even be selected?

Thanks,
Srinu.
  • January 27, 2015
  • Like
  • 0
Hi everyone,

Currently my client is using the "sawtooth" for survey purpose. 

Aslo client is using salesforce for case management. So they would like to know whether it would be possible with salesforce or not?

Any suggestion are appreciated.

Thanks,
Srinu.
  • January 27, 2015
  • Like
  • 0
Hi folks,

User-added image
What ever the email had configured in sandbox, I can see all those email in FROM drop down list. I want to prevent one of the email showing from that drop down list for certain case types. 

URL of that VF page: _ui/core/email/author/EmailAuthor?p3_lkid=500e0000005QE8b&retURL=%2F500e0000005QE8bAAG

I am not sure can we contrl that FROM thru url variables or not?

An suggestion would be appreciated?

Thanks,
Srinu.
  • January 23, 2015
  • Like
  • 0
Hi folks,

We have an integration with one client application from salesforce. All the intgration should go thru Proxy server (another client application). 

To achive this, we have configured Mutual Authentication in my sandbox and configured proxy server certificate (VeriSign Class 3 Internation Server CA - G3) signed by VeriSign in my sandbox and it's working.

Problem with another sandbox, where proxy server certificate (Symantec Class 3 Internation Server CA - G4 ) signed by Symantec which isn't supported by salesforce SSL certificate list.
https://developer.salesforce.com/page/Outbound_Messaging_SSL_CA_Certificates

I am thinkin of pushing salesforce to add "Symantec SHA2 ones" to their trust list, since industry is moving to the new SHA2 intermediate.

Do you guys think salesforce can do this for me?

Appreciate your suggestions !!

Thanks,
Srinu.
 
  • January 20, 2015
  • Like
  • 0
Hi folks,

Recruiter logs into salesforce and opens the existed case. From that case if recruiter wants to send a Lotus Notes meeting request for Manager & Team Lead. Would that be possible from salesforce?

Can we connect to Lotus Notes/Microsoft Outlook to create meeting requests in corresponding Email Systems?

Appreciate your help!

Thanks,
Srinu.
  • January 08, 2015
  • Like
  • 0
Hi folks,

We have a custom profile which is 'api enabled' and set 'password never expires'. Eventhough after 90 days password is expiring results integration is failing, why?

But in my org level, under password policies we have 'User passwords expire in' 90 days. Is that causing issue? Do we need to select 'Never Expires' under this section too?

Which one has high prefernce, Org Level Password Policies or Profile level settings?

Please provide your inputs to resove this issue !

Regards,
Srinu
  • January 05, 2015
  • Like
  • 0
Hi Guys,

Can we setup a mutual authentication for Data Loader?

We have a Data Loader setup on windows server and It is making a login call to salesforce and inserting/updating records over https. It's a secure way, but my client has a security server and all the webservices should go through that server for security reasons. 

Question is, can we setup "Mutual Authetnication" for the above process?
  • November 24, 2014
  • Like
  • 0
Hi,

We have Crew & Agent users in our org. Agent can have their own cases. Agent may become crew member tmrow. What ever cases Agent had, should be able to access after chnaged to Crew member. 

Now Agent users can't access their own cases? How could we provide access to them?

Profile/role will be different for both type of users? 

My thoughts:
Create a Permission set &
Can I develope a trigger to provide acces to case owner when chnages his/her Profile/role to Crew ?

Any suggestions would be appreciated !!


  • March 03, 2014
  • Like
  • 0

Hi All,

 

I am sending a request to one system for matching record. It will send the response back with matching record ((to SFDC) with standard 9 digit postal code. But SFDC is trimming to 5 digits and saves into DB.  Means we are degrading data quality from SFDC side, Right?

 

Is there any way to stop that process?

 

any suggestion would be appreciated !!

 

 

  • November 27, 2013
  • Like
  • 0
Hello,

We have few reports in place and whenever user runs they are recieving the report details in email body. 

Can we send the details as an attachment?

Any suggestions how can we achieve this functionality by using any custom code?

Thanks,
Srinu
  • May 03, 2016
  • Like
  • 1

Hi,

 

I have a trigger on opportunity, which submits the record for approval when it mets the criteria. But some how it is giving error:

 

Error Message when saving an opportunity:

 

OpportunityObject: execution of AfterInsert caused by: System.DmlException: Process failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, owner or user is inactive. Org Id:00D80000000aP47 User Id:005800000036h9Y: [] Trigger.OpportunityObject: line 258, column 1

 

Line 258 in my trigger:

 

// create the new approval request to submit
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments('Submitted for approval. Please approve.');
req.setObjectId(Trigger.new[i].Id);

// submit the approval request for processing
Approval.ProcessResult result = Approval.process(req);

 

Debug Log:

16:40:26.868 (1868370000)|WF_PROCESS_NODE|Step 1(Approval based on first response)
16:40:26.873 (1873156000)|WF_NEXT_APPROVER|Test User1|User|
16:40:26.874 (1874235000)|WF_NEXT_APPROVER|Test User2|User|  -->(Users defined in Approvel Process)
16:40:26.875 (1875200000)|WF_NEXT_APPROVER|Test User3|User|
16:40:27.512 (2512015000)|EXCEPTION_THROWN|[EXTERNAL]|System.NoAccessException: Invalid connected application: Chatter_for_iOS with Namespace: sf_chttr_apps
16:40:27.515 (2515129000)|EXCEPTION_THROWN|[EXTERNAL]|System.NoAccessException: Invalid connected application: Chatter_for_Android with Namespace: sf_chttr_apps
16:40:27.644 (2644188000)|CODE_UNIT_FINISHED|Workflow:ApprovalProcessActions
16:40:27.644 (2644403000)|DML_END|[258]
16:40:27.644 (2644565000)|EXCEPTION_THROWN|[258]|System.DmlException: Process failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, owner or user is inactive. Org Id:00DV00000087oVG User Id:00580000003SS10: []
16:40:27.646 (2646404000)|SYSTEM_METHOD_EXIT|[258]|Approval.process(Approval.ProcessRequest)
16:40:27.646 (2646531000)|FATAL_ERROR|System.DmlException: Process failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, owner or user is inactive. Org Id:00DV00000087oVG User Id:00580000003SS10: []

Trigger.OpportunityObject: line 258, column 1
16:40:27.646 (2646558000)|FATAL_ERROR|System.DmlException: Process failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, owner or user is inactive. Org Id:00DV00000087oVG User Id:00580000003SS10: []

Trigger.OpportunityObject: line 258, column 1

 

My Understanding: I tried to execute this code in full sandbox & UAT. Error is coming with different inactive user. I believe who ever is inActive and retrived by code and error is coming with that inActive User.

1. I jus want to know the whats the relation between opportnity crating User & inActive User. 

2. Is this causing Error: Chatter_for_iOS with Namespacesf_chttr_apps

                                           Chatter_for_Android with Namespacesf_chttr_apps

 

Any suggestions would be greatly appreciated !!

  • November 06, 2013
  • Like
  • 1
Hi Guys,

I am unable to pull the value from contact lookup field upon case creation. I am creating case as a community user and I belong to one region Account and trying to pull another region customer from the lookup. I can't see them. I can only see region related contacts. 

Do I need to setup more to see other region contacts as well?

Any suggestions?

 
  • December 15, 2015
  • Like
  • 0
Hi,

I have created one entitlement process which has entry criteria & exit criteria for the SLA to be start and stop. 

Issue is: SLA is getting assigned upon case creation but it's not getting stoppped when the exit criteria happened on case. 

Case exits the process based on 'Custom Criteria when formula evaluates to true'. 

Question: The field which am referencing in custom formula is a PickList field and I would like to STOP the SLA based on one of the picklist values. But SLA is not getting stopped when I select the defined picklist values from the drop down on the case detail page.Not sure whether it's wrong with my formula field OR something other?

Please guide me with your thoughts!

Thanks,
Srinu
  • August 10, 2015
  • Like
  • 0
Hi folks,

User-added image
What ever the email had configured in sandbox, I can see all those email in FROM drop down list. I want to prevent one of the email showing from that drop down list for certain case types. 

URL of that VF page: _ui/core/email/author/EmailAuthor?p3_lkid=500e0000005QE8b&retURL=%2F500e0000005QE8bAAG

I am not sure can we contrl that FROM thru url variables or not?

An suggestion would be appreciated?

Thanks,
Srinu.
  • January 23, 2015
  • Like
  • 0
Hi folks,

We have a custom profile which is 'api enabled' and set 'password never expires'. Eventhough after 90 days password is expiring results integration is failing, why?

But in my org level, under password policies we have 'User passwords expire in' 90 days. Is that causing issue? Do we need to select 'Never Expires' under this section too?

Which one has high prefernce, Org Level Password Policies or Profile level settings?

Please provide your inputs to resove this issue !

Regards,
Srinu
  • January 05, 2015
  • Like
  • 0
Hi Guys,

Can we setup a mutual authentication for Data Loader?

We have a Data Loader setup on windows server and It is making a login call to salesforce and inserting/updating records over https. It's a secure way, but my client has a security server and all the webservices should go through that server for security reasons. 

Question is, can we setup "Mutual Authetnication" for the above process?
  • November 24, 2014
  • Like
  • 0

Hello:

 

I am having issues with an Apex trigger designed to create a child records (Rep_Summary__c) after update of parent record (Video_Turf__c) where certain conditions are met.

 

Here is my trigger:

 

trigger RepSummaryCreation on Video_Turf__c (after update) {

    List<Rep_Summary__c> newSummary = new List<Rep_Summary__c>();
    for(Video_Turf__c a: trigger.new){
        if(a.Assigned__c==TRUE && a.Rep_One__c!=NULL){
            newSummary.add(new Rep_Summary__c(
                  Date__c = a.Date__c,
                  Release__c = a.ID,
                  Doors__c = a.Doors_Per_Rep__c,
                  Name = a.Rep_One__c));
        }
       }
  
    insert newSummary;
    
    List<Rep_Summary__c> newSummary2 = new List<Rep_Summary__c>();
    for(Video_Turf__c b: trigger.new){
        if(b.Assigned__c==TRUE && b.Rep_Two__c!=NULL){
            newSummary2.add(new Rep_Summary__c(
                  Date__c = b.Date__c,
                  Release__c = b.ID,
                  Doors__c = b.Doors_Per_Rep__c,
                  Name = b.Rep_Two__c));
        }
       }
  
    insert newSummary2;
    
    List<Rep_Summary__c> newSummary3 = new List<Rep_Summary__c>();
    for(Video_Turf__c c: trigger.new){
        if(c.Assigned__c==TRUE && c.Rep_Three__c!=''){
            newSummary3.add(new Rep_Summary__c(
                  Date__c = c.Date__c,
                  Release__c = c.ID,
                  Doors__c = c.Doors_Per_Rep__c,
                  Name = c.Rep_Three__c));
    }
   }
  
    insert newSummary3;
    
    List<Rep_Summary__c> newSummary4 = new List<Rep_Summary__c>();
    for(Video_Turf__c d: trigger.new){
        if(d.Assigned__c==TRUE && d.Rep_Four__c!=''){
            newSummary4.add(new Rep_Summary__c(
                  Date__c = d.Date__c,
                  Release__c = d.ID,
                  Doors__c = d.Doors_Per_Rep__c,
                  Name = d.Rep_Four__c));
    }
   }
  
    insert newSummary4;
    
    List<Rep_Summary__c> newSummary5 = new List<Rep_Summary__c>();
    for(Video_Turf__c e: trigger.new){
        if(e.Assigned__c==TRUE && e.Rep_Five__c!=''){
            newSummary5.add(new Rep_Summary__c(
                  Date__c = e.Date__c,
                  Release__c = e.ID,
                  Doors__c = e.Doors_Per_Rep__c,
                  Name = e.Rep_Five__c));
    }
   }
  
    insert newSummary5;
    
    List<Rep_Summary__c> newSummary6 = new List<Rep_Summary__c>();
    for(Video_Turf__c f: trigger.new){
        if(f.Assigned__c==TRUE && f.Rep_Six__c!=''){
            newSummary6.add(new Rep_Summary__c(
                  Date__c = f.Date__c,
                  Release__c = f.ID,
                  Doors__c = f.Doors_Per_Rep__c,
                  Name = f.Rep_Six__c));
    }
   }
  
    insert newSummary6;
    
    List<Rep_Summary__c> newSummary7 = new List<Rep_Summary__c>();
    for(Video_Turf__c g: trigger.new){
        if(g.Assigned__c==TRUE && g.Rep_Seven__c!=''){
            newSummary7.add(new Rep_Summary__c(
                  Date__c = g.Date__c,
                  Release__c = g.ID,
                  Doors__c = g.Doors_Per_Rep__c,
                  Name = g.Rep_Seven__c));
    }
   }
  
    insert newSummary7;
    
    List<Rep_Summary__c> newSummary8 = new List<Rep_Summary__c>();
    for(Video_Turf__c h: trigger.new){
        if(h.Assigned__c==TRUE && h.Rep_One__c!=''){
            newSummary8.add(new Rep_Summary__c(
                  Date__c = h.Date__c,
                  Release__c = h.ID,
                  Doors__c = h.Doors_Per_Rep__c,
                  Name = h.Rep_Eight__c));
    }
   }
  
    insert newSummary8;
    
    List<Rep_Summary__c> newSummary9 = new List<Rep_Summary__c>();
    for(Video_Turf__c i: trigger.new){
        if(i.Assigned__c==TRUE && i.Rep_Nine__c!=''){
            newSummary9.add(new Rep_Summary__c(
                  Date__c = i.Date__c,
                  Release__c = i.ID,
                  Doors__c = i.Doors_Per_Rep__c,
                  Name = i.Rep_Nine__c));
    }
   }
  
    insert newSummary9;
    
    List<Rep_Summary__c> newSummary10 = new List<Rep_Summary__c>();
    for(Video_Turf__c j: trigger.new){
        if(j.Assigned__c==TRUE && j.Rep_Ten__c!=''){
            newSummary10.add(new Rep_Summary__c(
                  Date__c = j.Date__c,
                  Release__c = j.ID,
                  Doors__c = j.Doors_Per_Rep__c,
                  Name = j.Rep_Ten__c));
    }
   }
    insert newSummary10;
                                        
}

 This seems to be a fairly straight forward trigger. What am I missing here that is not firing to create the records?

 

Thanks,

 

Hampton

Hi,

 

I am trying to find the photos of list of users. I am using below SOQL to get the PhotoUrl of USER:

SELECT Id,Name, FullPhotoUrl FROM User WHERE Id='123456789'

 

With that i can get the current page URL. 

 

Also, if someone uploads a second profile photo, I’m not sure where to find the original.

 

Any suggestions would be appreciated.

 

 

  • October 09, 2013
  • Like
  • 0

Hi,

 

I want to to extract Attachment Owner 'Photo' along with 'body' of the Attachment. Can anyone suggest SOQL to fetch the 'photo'?

 

I am trying this SOQL, but goving error like No such column:

 

Query from Attachment:

Select a.Body, a.Owner.FullPhotoUrl From Attachment a

 

ERROR at Row:1:Column:16

No such column 'FullPhotoUrl' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

 

Query from USER:

Select FullPhotoUrl from User --> is working fine w/out error.

 

Any suggestions would be appreciated..

 

 

  • October 08, 2013
  • Like
  • 0

Hi,

 

Occasionally we seem to have a problem where emails received by Salesforce do not create cases. his causes us a serious issue as requests (orders) from customers will likely be missed. 

 

We receive a warning by email which states: 

"...The following errors were encountered while processing an incoming email: 

UNABLE_TO_LOCK_ROW : unable to obtain exclusive access to this record..."

 

 

What i did for this is:

We have 3 triggers on Case Object, which fires upon case creation for an incoming Email from customers. Put all the code in try catch blocks and write a chatter post in catch block. There by chatter group people will get a chatter post upon any lock error from any trigger. There by we can move that code to batch class and call it in future method. So that, we can remove that lock error.

 

Does my approach solve this problem?

 

Any suggestions would be appreciated?

 

 

  • July 22, 2013
  • Like
  • 0

Hi All,

 

If i create a Case through Email-to-Case standard SFDC functionality, I should be able to execute all the triggers on Case Object, Right?

 

I couldn't see case object triggers firing eventhough i created a case record sucessfully in my org through 'Email Service Address' provided by Email-to-Case functionality?

 

should i configure anything else?

 

Any help would be appreciated !!

  • June 10, 2013
  • Like
  • 0

 

 

Hi EVeryone,

 

We are facing service issue..

 Below is error description. We are getting this, when we are trying to log in to any one of our sandboxes..

 

An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com! 

Error ID: 2100488013-2002 (1825576031)

 

We are thinking this is a SFDC server issue. If it's correct, then how much time they would take to solve this bug..?

 

Any Info would be greatly appreciated..!!

 

 

  • July 10, 2012
  • Like
  • 0

Hi,

   

   I am getting this one Error while executing my opportunity Wizard: List has more than 1 row for assignment to SObject

 

I have enabled my debugs and try to find out in which line error happened. But nothing can findout 4m my debug log. It doen't display any error details.

 

Reasons might be:  Any SOQL is getting 2 or more records insted of single record.

                                     

we can eliminate this situation by putting 'Limit 1' to SOQL....Right?

 

NOTE: This error is not happening at all times, Error coming only in Some times...


Any guess for this error and any suggestions how to solve this error?

 

Any help would be greatly appreciated....!!!


-Srinu

  • June 21, 2012
  • Like
  • 0

Hi,

 

 I am working on a trigger, which changes the default "UserRoleId" to "Executive" from "User".

 

 To achieve above functionality, I have written trigger like below:

 

 

//
//Trigger that changes the default role of a new user that is NOT a Standard user from the “User” role to the “Executive” role
//

trigger ChnageDefaultUserRole on User(before insert,before update) {

    Set<Id> accIdSet = new Set<Id>();
    Set<Id> conIdSet = new Set<Id>();
    Map<Id, Contact> conMap = new Map<Id, Contact>();
    Map<Id, Id> userAcctMap = new Map<Id, Id>();
    
    for(user u:trigger.new) {
        if(Trigger.isInsert) {
            if(u.contactId != null){ 
              if(u.UserType != 'Standard'){
                conIdSet.add(u.contactId);
                userAcctMap.put(u.AccountId, u.Id);
               }
             }
        } else {
            if((u.AccountId != null)){
              if(u.UserType != 'Standard'){
                accIdSet.add(u.AccountId);
                userAcctMap.put(u.AccountId, u.Id);
               }
            }
        }
    }
        

    if(trigger.isinsert){
        List<UserRole> usrRole  = new List<UserRole>();
        if(!conIdSet.isEmpty()) {
            conMap = new Map<Id, Contact>([Select Id, AccountId, Account.Name from Contact where id IN: conIdSet]);
            for(Contact con: conMap.values()) {
                accIdSet.add(con.AccountId);
            }
        }    
    }
    //@future methods call out happens here
   if(accIdSet.size()!= Null && accIdSet.size() > 0){
     UserDefaultRoleChange.RoleChange(userAcctMap,accIdSet, conIdSet);
   }
}

  Class:

  

Public Class UserDefaultRoleChange{
    @future
     public static void RoleChange(Map<Id, Id> userAcctMap,Set<Id> accIdSet, Set<Id> conIdSet){
         Map<Id, Account> accInfoMap = new Map<Id, Account>([Select Id, Name,OwnerId from Account where Id IN: accIdSet]);
         Set<String> accNameSet = new Set<String>();
         Map<Id, Contact> conMap = new Map<Id, Contact>();
         List<User> UpdateUserList = new List<User>();
         
        for(Account acc: accInfoMap.Values()) {    
            accNameSet.add(acc.name + ' Customer Executive');
        }        
        
        List<UserRole> usrRole = [Select Id, Name From UserRole Where Name IN: accNameSet];
        Map<String, Id> usrMap = new Map<String, Id>();        
        for(UserRole ur: usrRole) {
            usrMap.put(ur.name, ur.Id); 
        }
        
        for(Account acct : accInfoMap.Values()){
          if((acct.name + ' Customer Executive') != null){
            if(usrMap.get(acct.name + ' Customer Executive') != null) {
                User us = new User();
                us.UserRoleId = usrMap.get(acct.name + ' Customer Executive');                
                UpdateUserList.add(us));
            }
          }
        }
        
        if(UpdateUserList.size() > 0)
           update UpdateUserList;           
        
     }
}

 I am geeting this error:

EXCEPTION_THROWN|[51]|System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []

 

//UpdateUserList.add(new User(Id=acct.OwnerId, UserRoleId = usrMap.get(acct.name + ' Customer Executive')));

    Error For Above line:

Class.UserDefaultRoleChange.RoleChange: line 50, column 1
00:35:06.428 (428327000)|FATAL_ERROR|System.DmlException: Update failed. First exception on row 0 with id 005600000018VhmAAE; first error: FIELD_INTEGRITY_EXCEPTION, role type must match user type: []

 

any hep would be appreciated?

 

 

  • April 12, 2012
  • Like
  • 0

Hello Guys,

 

We are having one huge class , which is around 1500 lines of code in it and contains only one method.

now when we are trying to add any new code in methhod it shows compile error as below 

 

Compile Error : Method exceeds maximum number of allowed op codes, please break this method into multiple ,smaller methods.

 

 

 

Does is there any limit for code length in class function.

 

 

Any help will be apritiated .

 

Thanks,

Bala

 

{faultcode:'soapenv:Client', faultstring:'System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

 

Class.ApexcallingBpelSimple.ApexCalling_BPEL_SimplePort.process: line 19, column 13
Class.SFDCSyncWrapper.CreateFunction: line 12, column 17
External entry point', }

 

how to fix this

 

Thanks,

Vivek.

We have a trigger on the Account object that's part of a managed package.

 

If an unlicensed user edits something on the account page, I'm getting a general System.Exception exception saying that an object doesn't have an 'Id' field... 

 

Wondering two things:

  1. Can I wrap all of the contents of my trigger in a try/catch statement to prevent this error, and
  2. Can I use a System.NoAccessException to catch this so that other exceptions are handled differently?
We have been experiencing odd behavior with the "Password Never Expires" capability on the profiles and I was wondering if anyone else has experienced the same.
 
We have integrations built that access SFDC through the API.  We created separate user accounts and profiles for these integrations.  The integration profiles have been marked as "API Only" and "Password Never Expires".  We want to preserve the password considering this is an integration account.
 
For our regular users (non integration) we have established the password policies with "password expires 90 days".  Therefore, users are forced to change their passwords every 90 days.
 
Our integration user accounts have been getting the following error when trying to login using our integration or any other api application, such as the data loader:
Web service callout failed: WebService returned ­a SOAP fault:
INVALID_OPERATION_WITH_EXPIRED_PASSWORD: The user’s password has expired, You must call
SetPassword before attempting any other API operations
Faultcode=sf: INVALID_OPERATION_WITH_EXPIRED_PASSWORD
 
Although this error is produced when attempting to login through the integration account -- if the login history is viewed for this specific user, the history displays the login as "Successful".  In addition, we reset the password on the integration user account and the integrations continue to work ... for approx. 90 days then the same thing happens.  The same behavior happens in our sandbox environment.
 
I have contacted SFDC support but they do not seem to know what is causing this issue and their recommendation is to reset the password so they can monitor that account and see if it happens again.  It seems to me that the password policies are not adhering to the "password never expires" on the "API Only" integration accounts.
 
Please let me know if anyone has experienced the same behavior or has any additional information regarding this issue.
 
Thank you

 

 

  • January 12, 2009
  • Like
  • 1