• Sravan R Pinninti
  • NEWBIE
  • 10 Points
  • Member since 2014
  • AVCO Consulting, Inc.,

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
Hi All,

I have a requirement where the user who created the opportunity should always have edit access to it irrespective of the owner but standard SF functionality is not allowing this.

For eg:
User A creates an opportunity. User A chooses a field value based on which we change the ownership to User B using Apex. While changing the Ownership to B, I am adding an opportunity team member for User A with Edit access but its getting overridden to "Read Only" automatically. I tried adding opportunity share Records with Edit access to the opportunity but it's not helping me. I have also tried building a trigger on opportunity team member record to update the access level to edit whenever the Opportunity team record related to A is modified. 

Any ideas would be appreciated.

Thank You.

Regards,
Sravan.

Hi,

I have a requirement to update the current ActorId from the approval Process to the target object record. I am able to do this for initial submission, approval and rejection actions using workflow and triggers leveraging the trigger execution flow. 

I have to update the ActorId on the TargetObject record even when a process is Reassigned from one user to another. As, we do not have reassignment actions, is there any possibility apart from batch class that I can achieve this?

Thank You in Advance for your help!!

Regards,
Sravan.

Hi,

I have a multi-picklist field called Clarity__c with values 'Clear, Cloudy, Other'. I am using <apex:selectCheckboxes> and <apx:selectOptions> components to render the multi-picklist values as checkboxes and everything looks good. 

Now, I have a requirement to enable a Text field when Calrity__c includes the value 'Other'. How can I achieve the field enablement based on a particular value of the multi-picklist when using <apex:selectCheckboxes>??


Thank You In advance for the help!!
Hi,

I have a cutom object named Custom__c. THis object consists almost 400 fields. This application is fully built on VF pages. During a record conversion process, based on certain conditions I want to create a Custom__c object record and this record should have field values copied from the existing Custom__c object record and this record should have a different record type values. 
Our Administrator should have the flexibility to be able to add and remove the fields the needs to be copied over. Hence, I am planning to use fieldsets instead of querying the existing fields. Can someone suggest a sample code that can fulfill this requirement.

Thank You In advance for the help!!
HI,

I have a scenario where I have to assign the ownership of child records based on the value of a formula field on the parent record. I have used before Insert and it seems the functionality is working as expected but I have some concern over the order of execution.
Can someone suggest me the Ideal way of doing this. Should I go for a before trigger or After Trigger?
Hi,

I have a VF page on which I have a button named "Print". On click of print, the user will be redirected a page which is rendered as PDF. Both these pages use same controller. 

Based on a Boolean value i want the name of the PDF to be changed when user tries to Save the file. RIght now, the file name defualts to the name of the page. I have used Apexpages.currentPage().getHeaders().put('content-disposition', 'attachment; filename=AccountReport.pdf' in the constructor and I also tried using this inside a method but both did not satisfy my requirement completely. When I use the above code in constructor, the PDF is downloading even before the page is loaded and if I use the code inside a method the PDF is downloaded directly. 

I do not want the PDF to be downloaded. I just want the name to be dynamic when user tries to Save the PDF? Am I missing something here.

Thank You in advance for your help!!

Regards,
Sravan.
hi guys 
hope all are doing well.pls help me out with this small issue.
I created a apex class where i fetched query like user u1=standard platform user profile and user u2=system admin profile,so my condition is ,i want to gave user u1 to run Annual revenue field and user u2 to run phone field from account.

heres my code:
public class runasdemo2{

user u1=[select user.profile.name, user.Username from user where profile.name='Standard Platform User' and user.username='aasalesforce.consultant11@gmail.com'];
user u2=[select user.profile.name, user.Username from user where profile.name='System Administrator' and user.username='salesforce.learner999@gmail.com'];

{
  if(u1.contains(profile.name='Standard Platform User'))
  {
   account a1=new account();
   a1.name='testaccount';
   a1.annualrevenue=12345;
   insert a1;
  }else
  {
   account b1=new account();
   b1.name='salesforce';
   b1.phone=1234124;
   insert b1;
   }
   
}
}

pls help me out.
tnks 
Hi,

I have a VF page on which I have a button named "Print". On click of print, the user will be redirected a page which is rendered as PDF. Both these pages use same controller. 

Based on a Boolean value i want the name of the PDF to be changed when user tries to Save the file. RIght now, the file name defualts to the name of the page. I have used Apexpages.currentPage().getHeaders().put('content-disposition', 'attachment; filename=AccountReport.pdf' in the constructor and I also tried using this inside a method but both did not satisfy my requirement completely. When I use the above code in constructor, the PDF is downloading even before the page is loaded and if I use the code inside a method the PDF is downloaded directly. 

I do not want the PDF to be downloaded. I just want the name to be dynamic when user tries to Save the PDF? Am I missing something here.

Thank You in advance for your help!!

Regards,
Sravan.