• m pandey
  • NEWBIE
  • 80 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 21
    Replies
how to show pick list values in visual force page using remote action in apex class
How to dynamically add rows in visualforce page using bootstrap and edit in same row.?

System.DmlException: Upsert failed. First exception on row 0; first error: STRING_TOO_LONG, password: data value too large: *** encrypted text *** (max length=15): [password__c]


while inserting a encrypted field as password



public class newformcntrl {

     public account accs{get;set;}
     public string id{set;get;}
   public account acc{get;set;}
    Blob cryptoKey = Blob.valueOf('380db410e8b11fa9');

    

    public newformcntrl (ApexPages.StandardController controller) 
    {

        accs=(account)Controller.getRecord();
        id=apexpages.currentpage().getparameters().get('id');

    }
    
    
     public pagereference savee()
    {   
          if(accs.password__c!=null)
          {
             Blob data = Blob.valueOf(accs.password__c);
             Blob encryData = Crypto.encryptWithManagedIV('AES128', cryptoKey , data );
             String bData = EncodingUtil.base64Encode(encryptedData);
             accs.password__c= bData;


             Blob dta3 = EncodingUtil.base64Decode(accs.password__c);
             Blob decryptedData = Crypto.decryptWithManagedIV('AES128', cryptoKey , dta3);
             String dryptData = decryptedData.toString();


          }

        upsert accs;
        pagereference p=new pagereference('/apex/newaccview?id='+acc.id);
        p.SetRedirect(true); 
        return p;
    }
   

}
using only in apex and visual force page
vf page ---> registration form

user name   mandatory  &  no same record are inserted (no duplicates are allowed)
email       mandatory  &  no same record are inserted (no duplicates are allowed)
mobile no   
password             mandatory  
conform password              mandatory  

buttons =register  & cancel


vf page --->login  form

user name             mandatory  
password            mandatory  


buttons = login & forgot password




vf page ---> forgot password
user name or emaild 
buttons = new password should send to email



 
object=objA
Start date
End Date
rates number

object=objb
transadate date
quantity number

dis*rate

if transdate is in b/w stdate and enddate the rates should be apply 
ex:-
obja 
it has 3 records that 1)stjan1 to jan31,2)stfeb1 to etfeb27,3)stmar1 to mar30
it has rates of     10.50             15.20        20.00

if i create record in objb,then transdate 22/2/2017 ,the rate should get in between of stdt and endt selected date 

sol
if i select transdate the selectdate should fetch from date related record from obja and if i enter quantity then the rate should fetch from related transdate
please help me out as early as possible....
Can Any one explain with example of code using custom objects Approval Process using apex & Visual force page

Fields:-
name
Quantity
Amount 
manager 
status inprogresss,submiitted ,approved rejected 
 After Save in the record(vf page)
status -inprogress

he has to get submit for approval(vf page)
after submitted status submited

after subitted manager has to approve or reject 

Please reply or post its has submit for client
how to display account records in multipicklist and it should move from left selected values to right selected.?
account records in multipicklist and it should move from left selected values to right selected and from right selected to left selected and after coming to right multi picklist  and then if one or two or more then  selected account record shoould show contacts(child record associated wth account)
can any one help me out in this....?


User-added image
Account look Up        & standrd
Project  Look Up            custom(related list in account)

then form__c(custom object) has the Account & Project lookup in  form__c object

if account lookup is selected ABC record 
then Project lookup should show associted or related records in lookup

this functionality should be in lookup and pick list....
so please send the code as  early as possible please
 
when ever i select the start date and end date the records i have created in account object
if i select the date from perticular date to perticular date the date i have entered data should
be shown using the @remote actions...?
how to insert a data form with the details Name Phone Email and when u press on create the details have to be save
in  database nd the details u have to show and below the form
using remote action.?
how to get edit and delete button in a custom visual force page of account.....?
if click on edit it should edited and delete means it should deleted.....
how to get edit and delete button in a custom vf page of account.....?
 
i have created class and vf page on contact object...
in vf page when ever i search in search field of vf page then all records related to the contact should be the result..?
if i type 'ab' and search the ab related or the name it self contain ab alphabets or word should be displayed in vf page.?
​how can we achieve...?
i have created class and vf page on contact object....
in vf page when ever i search in search field of vf page then all records related to the contact should be the result...?
if i type 'ab' and search the ab related or the name it self contain ab alphabets or word should be displayed in vf page..?
how can we achieve...?
sttime 5:00 AM
ettime 6:00 PM

sttime in text frmt
ettime in text frmt

i want the total hours in time between..
stime 5:00 AM
etime 6:00 PM

stime in text frmt
etime in text frmt

i want the total hours in time between
trigger newacconsal on Contact (after insert) {
    set<Id> ids=new set<Id>()
    
    map<id,Account> macc=new map<id,Account>();
    map<id,Contact> mcon=new map<id,Contact>();
    
        map<id,Account> macc=trigger.old;

}


Error

Illegal assignment from Map<Id,Contact> to Map<Id,Account>
trigger newacconsal on Contact (after insert) {
    set<Id> ids=new set<Id>();
    
    map<id,Account> macc=new map<id,Account>();
    map<id,Contact> mcon=new map<id,Contact>();
    
        map<id,Account> macc=trigger.old;

}


Error

Illegal assignment from Map<Id,Contact> to Map<Id,Account>
let me know what will be the error




iam unable to get the code coverage....?
account -  fld-Total sal-intger r currncy

contact -fld  -sal of cntct-intger r currncy

when ever we create cntct  and sal is added in the field all cntct sal of total should be updated in account total sal field

Task-ex: if we have 5 cntcts of sal(10.000,25.0000,55.444,22.000,77.0000) while creating f recrd and updatng the recrd in sal fld in cntcts
it should be total in accnt fild total salary.....?
object=objA
Start date
End Date
rates number

object=objb
transadate date
quantity number

dis*rate

if transdate is in b/w stdate and enddate the rates should be apply 
ex:-
obja 
it has 3 records that 1)stjan1 to jan31,2)stfeb1 to etfeb27,3)stmar1 to mar30
it has rates of     10.50             15.20        20.00

if i create record in objb,then transdate 22/2/2017 ,the rate should get in between of stdt and endt selected date 

sol
if i select transdate the selectdate should fetch from date related record from obja and if i enter quantity then the rate should fetch from related transdate
please help me out as early as possible....
Challenge Not yet complete... here's what's wrong: 
The 'Accounts' class 'onApplyDefaults' method does not appear to be setting the Description field to 'Domain classes rock!' correctly for a default value.
public override void onApplyDefaults() 
	{
        List<Account> updatedAccounts = new List<Account>();
        
        for (Account acct : (List<Account>)Records) {
                acct.Description = 'Domain classes rock!';
                updatedAccounts.add(acct);
        }
        
        fflib_SObjectUnitOfWork uow = new fflib_SObjectUnitOfWork(new Schema.SObjectType[] { Account.SObjectType });
        uow.registerDirty(updatedAccounts);
        uow.commitWork();
    }

Any recommendations or suggestions would be greatly appreciated.

Hi All,

I have written a trigger which is used to insert the status changes on an object. i.e there are multiple updates on an object and i need to do the following :

1.)insert a record into the new object when "Availability time is changed"
2.)insert when the "status" of a object is changed.
For each change i need one instance to be created with appropriate values for time and status change
But the trigger acts roguely. sometimes it creates a record and sometimes it waits for another trigger which will create an object in the table and then fire multiple times. How can i stop this recursive behaviour of the trigger?
Can someone please look into the below code suggest the changes :

trigger UpdateHistoryStatusOnService on WorkOrder (After update) {
 
Service_Status_History__c statusobj = new Service_Status_History__c(); //the object in which a record should be inserted
    List<WorkOrder > liserv = [select id, name , Financial_Status__c, Package_Decline_Reason__c,packagecomments__c,Timechange_comments__c,Timechange_Reason__c, Workorder_Status__c from WorkOrder where id in : Trigger.new];
    list<Service_Status_History__c> hlist= new list<Service_Status_History__c>();

   
    for(WorkOrder s : liserv){
         
        if(s.Financial_Status__c == 'Package Submitted' || s.Financial_Status__c == 'Package Declined' ){
            statusobj.Name = 'Package';
            statusobj.Service__c = s.id;
            if(s.Financial_Status__c == 'Package Declined' ){
                if(s.Package_Decline_Reason__c != null || s.packagecomments__c!= null)
                {
                    statusobj.Reason_Code__c = s.Package_Decline_Reason__c ;
                    statusobj.Comment__c = s.packagecomments__c;
                     statusobj.Previous_Status__c= trigger.oldmap.get(s.id).Financial_Status__c ;
                     statusobj.New_Status__c = s.Financial_Status__c ;
					 //insert the record with presentstatus, previous status, reason code and comments 
                }   
           
            //hlist.add(statusobj);
            
        }
        else if (s.Financial_Status__c =='Package Approved'){
            statusobj.Previous_Status__c= trigger.oldmap.get(s.id).Financial_Status__c ;
            statusobj.New_Status__c = s.Financial_Status__c ;
           //insert when package approved
           
        }
          /*  else if (s.Financial_Status__c =='Package Submitted'){
            statusobj.New_Status__c = s.Financial_Status__c ;
           
           
        }*/
     
      
        
    }
    else {
      }
     
      
      if(s.Timechange_comments__c!= null  && s.Timechange_Reason__c!= null ){
       statusobj.Name = 'Time Availability';
       statusobj.Reason_Code__c = s.Timechange_Reason__c;
       statusobj.Comment__c = s.Timechange_comments__c;
       statusobj.New_Status__c = s.Workorder_Status__c ;
       //hlist2.add(statusobj);
      //  insert hlist2;
	  //Insert when availability time is changed
     } 
   
    
 
}
   
    hlist.add(statusobj);
    insert hlist;
}
 

Thanks,

Bharath

Hello,

             Sometime exchange file got corrupted due to unavailability of internet, virus attach Exchange mailbox crash, hardware and software failure, human made error, dirty shutdown error, jet engine error etc. So, if your exchange file got corrupted due to these above reasons then to get them repaired you can use EDB to PST Converter Software that provides simple procedure to convert exchange EDB to PST File without difficulty.
User-added image

As a most convenient and effective software, EDB to PST Converter is made with latest technique to Exchange Server Data (.edb) to Outlook (.pst). It is good solutions that produce simple to understand process for Migration of EDB mailboxes to Outlook Mailboxes along with complete previous attachments. This tool helps to pick up all EDB emails between 2 dates “to date” to “from date” without any difficulty.

This EDB Converter is well- integrated made with latest technology to convert EDB to PST file and retrieve all users’ mailbox folders and sub-folders. It makes Exchange EDB readable in PST with real Exchange data format as TXT, RTF and HTML etc. Completely compatible with all MS Exchange Server versions and MS Outlook. Moreover, user can use it for migrating recovered database to any cloud-based platform.
 
User-added image
   
The evaluation program is free for everyone who wants to evaluate its EDB to PST converter. With free trial version, one can see the result of all recovered outlook mailboxes on their screen.
how to get edit and delete button in a custom vf page of account.....?
 
i have created class and vf page on contact object...
in vf page when ever i search in search field of vf page then all records related to the contact should be the result..?
if i type 'ab' and search the ab related or the name it self contain ab alphabets or word should be displayed in vf page.?
​how can we achieve...?
i have created class and vf page on contact object....
in vf page when ever i search in search field of vf page then all records related to the contact should be the result...?
if i type 'ab' and search the ab related or the name it self contain ab alphabets or word should be displayed in vf page..?
how can we achieve...?
trigger newacconsal on Contact (after insert) {
    set<Id> ids=new set<Id>()
    
    map<id,Account> macc=new map<id,Account>();
    map<id,Contact> mcon=new map<id,Contact>();
    
        map<id,Account> macc=trigger.old;

}


Error

Illegal assignment from Map<Id,Contact> to Map<Id,Account>
trigger newacconsal on Contact (after insert) {
    set<Id> ids=new set<Id>();
    
    map<id,Account> macc=new map<id,Account>();
    map<id,Contact> mcon=new map<id,Contact>();
    
        map<id,Account> macc=trigger.old;

}


Error

Illegal assignment from Map<Id,Contact> to Map<Id,Account>
let me know what will be the error




iam unable to get the code coverage....?
account -  fld-Total sal-intger r currncy

contact -fld  -sal of cntct-intger r currncy

when ever we create cntct  and sal is added in the field all cntct sal of total should be updated in account total sal field

Task-ex: if we have 5 cntcts of sal(10.000,25.0000,55.444,22.000,77.0000) while creating f recrd and updatng the recrd in sal fld in cntcts
it should be total in accnt fild total salary.....?
account -  fld-Total sal-intger r currncy

contact -fld  -sal of cntct-intger r currncy

when ever we create cntct  and sal is added in the field all cntct sal of total should be updated in account total sal field

Task-ex: if we have 5 cntcts of sal(10.000,25.0000,55.444,22.000,77.0000) while creating f recrd and updatng the recrd in sal fld in cntcts
it should be total in accnt fild total sal.?
i need u r  help.....
https://developer.salesforce.com/forums/?id=906F0000000AxfCIAS 
as u have shown code for above link for  parent to child when we will select  for the parent to child
bt i need the select for all  where i check the check  all accounts should be selected and all contacts child should be shown in vf page....?
please let me get the code pleasee..