• Alex Jaimes
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hello, 

We have a Mobile iPad App installed in our organization that uses the User.ProfileId field. The App uses that field to determine access based on user profile. We set the "View Profile and Configuration" permission to grant access to that field, but it is giving more access that we would like to give users. (all metadata, Audit trail, login history, etc.)

 

Is there another way to grant access to the User.ProfileId without giving access to so much information?

 

Many thanks,

Hello, 

We have a Mobile iPad App installed in our organization that uses the User.ProfileId field. The App uses that field to determine access based on user profile. We set the "View Profile and Configuration" permission to grant access to that field, but it is giving more access that we would like to give users. (all metadata, Audit trail, login history, etc.)

 

Is there another way to grant access to the User.ProfileId without giving access to so much information?

 

Many thanks,

Hello

Is there a way to retrieve definition of a custom report thanks to its url or its name ? : API or APEX

The idea is : my customer create a tabular report with column, filter... (he knows how to do it)

I get definition of report and perform same request in soql

Thanks for your help

Hello,

 

I have an Apex Trigger that I am trying to deploy through Change Sets from Sandbox to Production. It is a field update on the opportunity object. It works fine in Sandbox, and when I run tests I get 100% test coverage. However when I try to "validate" in the inbound change sets section in production I get errors like this: 

quoteExtTests.basicAttachTest()Class109 Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, JP_Opportunity: execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject Trigger.JP_Opportunity: line 10, column 1", Failure Stack Trace: "Class.quoteE...
quoteExtTests.basicSaveTest()Class109 Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, JP_Opportunity: execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject Trigger.JP_Opportunity: line 10, column 1", Failure Stack Trace: "Class.quoteE...

 

These Classes are from years ago, not even sure that they're still in use. I am new to deploying apex and not sure what they mean? Can someone help explain is this something to be concerned about? Can I ignore the test classes? Is it my code that is causing the issue? My code is below: 

 

trigger SF_Opportunity on Opportunity (before insert, before update) {
    
    //Change the Opportunity_Manager__c so the field is up to date with the current Opportunity Owner's Manager. 
    for (opportunity o : Trigger.new) {
        //get a list of the user object from the opportunity owner. 
        List<User> oppOwner = [select managerid, name, UserRole.name from user where user.id =: o.ownerid];
        system.debug('USER LIST ***' + oppOwner);
    for (user oppOwn : oppOwner){
            //update the fields based on the id of the opportunity owner
          o.Opportunity_Owner_Manager__c = [select name from user where user.id =: oppOwn.managerid].name;
          o.Opp_Owner_Role__c = [select name from UserRole where UserRole.id =: oppOwn.UserRoleID].name;
        }
  }
}

 

Thanks for the help, again I am new to this just trying to learn as much as I can.

 

Thanks!