• dineshkumar
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I have a site where a user can create a new record and the goal is that this user can select their first approver from a lookup field.  I have the first step in the approval process set to "Let the submitter choose the approver manually" and I have already created a trigger that automatically submits a record for approval when created. I am attempting to use the setNextApproverIds method to pass in the approver from the form but I'm not sure how to get the selected users ID. Any help is appreciated.
trigger requestSubmit on Request__c (after insert) {

for (Request__c r : trigger.new) {
Approval.ProcessSubmitRequest app = new Approval.ProcessSubmitRequest();
app.setObjectId(r.id);

app.setNextApproverIds(.profileID);

Approval.ProcessResult result = Approval.process(app);
}
}
please help me.........
I have confuse abt OWD -(PRIVATE ,PUBLIC READ AND PUBLIC READ/WIRITE) VS profile (CRUD AND VIEW ALL AND MODIFYALL ) .
OWD-RECORD LEVEL ACCESS
PROFILE - OBJECT LEVEL ACCESS
1.WHEN I SET CRUD ACCESS FOR THAT PROFILE - CAN I CREATE OBJECT RECORD FOR THAT PROFILE USER IS IT CORRECT?
2.WHEN I SET OWD- PUBLIC READ /WRITE-CAN I CREATE OBJECT RECORD?
Both 1 and 2 allow to Create records?
Here What is the use of OWD over Profiles?
3. If I set Profile View all , Modify all ,Is it Possible to set OWD is Private?
I have confuse about OWD Vs Profiles?
Thanks in Advance...
I have 100 users with  same profile . profile name isX .here i want to give Permission to 90 users - for access  The ABC Object  ..other 10 user cannot access the ABC object.
how to  set OWD For above task ?How to set profile for the ABC object.?what are the way we  can achieve this?.Please share your knowledge.
Good Day,
when I upload bulk data on monthlycountva object.some field fetch from account va object and update on monthly count va object.
Condition
monthlycountva account+va=accountva account+va
Here some of duplicate record found in account va object.
monthlycountva object:I want to insert and update from account va object (like placement type,type).if duplicate record found on account va object it will treat as one or its take value from any one of record.
how to avoid that dupliacate record and update all monthlycountva object data.please guide me.
My code:
rigger UpdatefromAccVA on MonthlyVACount__c (after insert,after update)
{
   list<MonthlyVACount__c> mva = trigger.new;
   list<Account_VA__c> acva = new list<Account_VA__c>();
   list<MonthlyVACount__c> mvupdate = new  list<MonthlyVACount__c>();
   list<MonthlyVACount__c> mva1 = new  list<MonthlyVACount__c>();
   list<string>  accid = new list<string>();
   list<string>  vaid = new list<string>();
   list<string> mvaid = new list<string>();
   for(MonthlyVACount__c mvax : mva)
   {
    accid.add(mvax.Account__c);
    vaid.add(mvax.VA__c);
    mvaid.add(mvax.id);
   }
     acva = [select id,account__c,VA__C, Type__c,Placement_Type__c,No_of_Hours__c,effective_Date__c,Case_Outcome__c from Account_VA__c where (account__c in : accid and VA__c in : vaid)];
     mva1 = [select id,Account__c,VA__c,VA_Type__c,Placement_Type__c,VACount__c,Effective_Date__c,Latest_Case_Outcome__c from MonthlyVACount__c where id in : mvaid];
     if(acva != null)
    
     {
    
      for(MonthlyVACount__c mvaxx : mva1)
      {
       for(Account_VA__c acvax : acva)
       {
        if(mvaxx.Account__c == acvax.account__c && mvaxx.VA__c == acvax.VA__C && mvaxx.Account__c!=null &&mvaxx.VA__c!=null)
        {
       
         mvaxx.VA_Type__c=acvax.Type__c;
         mvaxx.Placement_Type__c=acvax.Placement_Type__c;
       //  mvaxx.VACount__c= vacount;
        // mvaxx.Effective_Date__c=acvax.Effective_Date__c;
         mvaxx.Latest_Case_Outcome__c=acvax.Case_Outcome__c;
         mvupdate.add(mvaxx);
         }  
       }
      }
  
      update mvupdate;

    }
}
I have 100 users with  same profile . profile name isX .here i want to give Permission to 90 users - for access  The ABC Object  ..other 10 user cannot access the ABC object.
how to  set OWD For above task ?How to set profile for the ABC object.?what are the way we  can achieve this?.Please share your knowledge.

Hi all

 

what is difference between sales cloud and service cloud?

 I am Unable to understand 

 

Regards

 

Linganna