• Amit Kr Singh
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 24
    Replies
Hi Please help write test class and get code coverage for my class

Class:-
public class IssuersCalloutController{

    public IssuersCalloutController(ApexPages.StandardController controller) {

    }


public PageReference saveCalloutResult(){
         
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://test/getIssueList');
        req.setMethod('GET');
        req.setHeader('Content-Type', 'application/json');
        req.setHeader('Accept','application/json');
         system.debug('request endpoint '+ req);    
        String username = 'amit';
        String password = 'password';
        
        Blob headerValue= Blob.valueOf(username + ':' + password);
        system.debug('headerValue'+ headerValue);
        String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);
        req.setHeader('Authorization', authorizationHeader);
        req.setTimeout(60000);
        
        system.debug('###req### '+ req);            
        HttpResponse res = h.send(req);
        system.debug('###res### '+ res);
        
        string response = res.getBody();
        system.debug('response'+ response);
               
                
        Set<String> bankNames = New Set<String>();
        // declare issuer list to inser 
        List<Issuers__c> InsertedIssuers = New List<Issuers__c>();
        // I used limit in below query, but its better to use any filter to limit the data
        for(Issuers__c issuer : [Select Id,Bankdir_Name__c from Issuers__c LIMIT 50000]){
           If(!string.isBlank(issuer.Bankdir_Name__c)){
             bankNames.add(issuer.Bankdir_Name__c);
             
             //system.debug('###Bank Name### '+ bankNames); 
             //system.debug('issuerbankdir'+ issuer.Bankdir_Name__c);
            }
        }
        system.debug('###Bank Name### '+ bankNames.size());
        List<JsonParserDetail> responseDetails = JsonParserDetail.parse(response); 
        system.debug('****responseDetails****** '+responseDetails);
        
        if(responseDetails.size() > 0){
            for(JsonParserDetail jpd : responseDetails){
                If(!bankNames.contains(jpd.issuerBankdirName)){                
                 InsertedIssuers.add(getIssuer(jpd.issuername,jpd.issuerBankdirName,jpd.processorName,jpd.subProcessorName,jpd.siloName));
                }
            }
        }
        If(InsertedIssuers.size() >0){
            insert InsertedIssuers;
            
      
        }
        PageReference p = apexPages.currentPage();
      ApexPages.Message msg=new ApexPages.Message(ApexPages.Severity.CONFIRM,'Preview 2 list Successfully updated'+InsertedIssuers.size()+'"Thank you!');
      ApexPages.addMessage(msg);
      return p;
    }
  public Issuers__c getIssuer(string iName, string ibName, string pName, string spName,string siloName){
        Issuers__c issuer = New Issuers__c();
        issuer.Name = iName;
        issuer.Bankdir_Name__c = ibName;
        issuer.Processor_Name__c = pName;
        issuer.SubProcessor_Name__c = spName;
        issuer.Silo_Name__c = siloName;
        return issuer;
    }
}

Thanks
Hi all,

I am having 3 objects.
Object1, Object2, object3.
Object1 having some record. and Object3 having Some records.
Object 1 and object 2 having lookup relationship.
Now I want to create Object 2 record by selecting multiple records from Object 3  and then object 2 records need to show into the object1 Related list.

Please tell me how I will get this by using  Visualforce Page.


Thanks,




 
Hi All,

I want to consume third-party Rest API in Salesforce and also I want to store all response in salesforce custom Object"Cust_obj__c".
I want to save all response in Salesforce custom object.

Please help with Code. 

Thanks,
In advance 
How to create visual force page to display list of value along with checkbox and once I will select checkbox then child record need to create 

I am having Two object 
1. Parent__c
2, Child__c

In parent object having many records.Using visual force page I want to display all parent__c object record along with checkbox and also want the search box to find the record. if will select two records then 2 child __c records need to create. if will select 10 records then 10 child__c records need to create. 
For example:-
User-added image
Like this want create visual force page if will select and record then it needs to create chlid__c records.

Please provide me visual force page code and controller code for this requirement.

Thanks,
Amit 


 
Hi All,

I want to get data from other application to my salesforce org. In my salesforce org have created one object called "Issuer__c" and there i have created 4 filed as per JSON.
I am having third-party Jason and API also so. please tell me integration process using rest api.

[  
   {  
      "issuername":"abc",
      "issuerBankdirName":"def",
      "processorName":"ghi",
      "subProcessorName":"jkl"
   },
   {  
      "issuername":"amit",
      "issuerBankdirName":"am",
      "processorName":"ba",
      "subProcessorName":"ka"
   },  

 {  
      "issuername":"Roshan",
      "issuerBankdirName":"ban",
      "processorName":"bih",
      "subProcessorName":"pat"
   }
]


Please help me how to integrate the third party system to get data. 
please provide me the code for this.

Thanks,
Hi, All

In my current scenario, I want to select multiple lookup values in the single lookup field. how to achieve this, please help me. 
  User-added image


Please help me. 
Thanks in Advance.
Hi All,
In my current scenario 
I am having two Object
1. projects__c(Parent object) (In Project object having field ProjectTaskDescription__c, TimesheetStartDate__c, TimesheetEndDate__c  ) 
2. Timesheet__c(Child Object) (In Timesheet object having field  TimesheetDescription__c, Timesheet_Date__c   )

Now  I want to write a trigger on the Parent object(Projects__c) when user will update TimesheetStartDate, TimesheetEndDate and once he will save then related timesheet object(Timesheet_Date__c) field date is between  Project(TimesheetStartDate, TimesheetEndDate )   then  (TimesheetDescription__c ) field  value need to concatenate and display into project object field ( ProjectTaskDescription__c ) ..

Please help me how to write trigger for this.
Please help me to write a trigger on this scenario.


Thanks in Advance.
 
 
Hi All,

In my current scenario, i am having 2 object
1. Project__c is parent object  field is 
     projectImplementation__c
2 Timesheet __c is child object  (in timesheet object Project is master)  field is 
    ThimesheetDescription__c

Now when user creating timesheet multiple time  and filling TimesheetDescription then  this value needs to add into Project object 
projectImplementation__c field value  every time

please help me. 
Hi in my current scenario case Escalation rule is:-
I want to add one condition if created by user profile equal to QA or Apps then case no need to Escalate but if other then QA, APPS any one create case then it needs to escalate.  So help me how to get this function
my code is below:- 

AND( 
Account.Primary_Project_Manager__r.Manager.Alias = "bgeor", 
$RecordType.Name = "Professional Services", 
Account.Arcot_Internal__c =False, 
NOT( ISPICKVAL(Type, "Duplicate")),NOT( ISPICKVAL(Type, "SOW Request")), 
NOT( ISPICKVAL(Status, "Closed")), NOT( ISPICKVAL(Status, "Duplicate")), NOT( ISPICKVAL(Status, "On Hold")), 
TODAY() >= Expected_Reponse_Date__c)



Thanks,
Hi All,
In my current scenario  I am having 3 objects.
1. Projects__c
2. Opportunity
3. Timeshaeet__c
 Project__c is lookup to opportunity and Timesheet __c object.
 opportunity is lookup to Timesheet__c object. so now if I am creating a timesheet from an opportunity object then both, opportunity and project lookup need to auto fill.
my Query screen shot


Hi Please provide me a trigger for my query.

Thanks,
Amit
Hi All,

In my current scenario, I am having  50 users in my organization, 10 are in the US, 20 are in the UK, 20 are in India. every user is using his own time zone. 
if I am creating one record using Object Name "test_object__c " then I want one field that stores GMT time zone for all user, if the user is in the US or, the UK, or in India.

if "target_date___c" date field stores according to all users time zone but I want to convert all time zone that store in target date field should convert into GMT and stores into  "ConvertedDateField_with_GMT__c" field.


Please help me.

Thanks in advance.
 
 
Hi All ,

In my current senario I want to create case in salesforce from other web application and also if any update user will do in salesforce case that will go to Web application

Please help me 
Hi 
In my current senario i want to create time based approval process.

On Opportunity object i have written approval process depend upon some cariteria. so now i want   
1. Manager approval for every opportunity within 24 hours, else auto escalation to second level.
2. Currently, abc, xyz, DEF are having account mangers below them - if they dont approve opportunities , it need to go to SystemAdmin(Ram) automatically after 24 hours.


Please Help me  
 
Hi All
 In my current senario i am having 100 assets and that i want to keep in box,
for box and assets i have created QR code but when i want to create QR code for box that time below of the box QR code all box releted assets should print in 3 columns.

please help me..
Thanks
Hi All i am getting error when i am moving trigger using change set from sandbox to production.

I have created change set and when i want to upload that time i am getting this error please tell me solution for this error.
Error:-
All components failed Version Compatibility Check.
Every component in this change set requires the "37.0" or higher platform version. Please select an organization with a platform version of "37.0" or higher.


Plz help me 
Thanks..
 
Hi All,

In my current senario i am having Account object and Contact object

In Account object  field name is   Atest__c
and Contact Object field anme IS Ctest__c

i want to update Contact  object Ctest__c  field  value with Account Atest__c value 

so plz help me to write trigger
thanks
My controller:-

public class Auditcontroller
{
       public Auditcontroller(ApexPages.StandardController controller) {
       inventAudit=new Inventory_Audit__c();
       productcount=new List<Product_Count__c>();
       poid=ApexPages.currentPage().getParameters().get('id');

       productcount=new List<Product_Count__c>();
       
       if(poid !=null)
       {
       
       inventAudit=[select name,Account__c,Status__c,Audit_Date__c,product__c from Inventory_Audit__c where id=:poid];
       }
       
       ps=inventAudit.Account__c;
       p=new Product2();
    }
 public Product2 p{get;set;}
 public list<Account> acc{get;set;}
 public list<Asset> invent{get;set;}
 public Inventory_Audit__c inventAudit{get;set;}
 public List<Product_Count__c> productcount;
 public List<InventWrapper> lstInventWrapper {get;set;}
 public Product_Count__c pc{get;set;}
 Public string sp{get;set;}
 public Integer call{get;set;}
 public Id stockdcid {get;set;}
  public String currentStockInventory{get;set;}
 Public Id Poid{get;set;}
public Asset ass{get;set;}
public string ps;

 public void  productDetails() //on click 'Go' button based on seach condition displaying inventory details on page
  {
   if( inventAudit.Account__c!=null && inventAudit.Status__c=='open')
   {
     invent=[select id,Audit__c,name,Product2Id,AccountId,SerialNumber,Status,Reason1__c  from Asset where (Audit__c='Not present' And AccountId=:inventAudit.Account__c) OR (Audit__c='' And AccountId=:inventAudit.Account__c)];
     
      currentStockInventory=apexpages.currentpage().getparameters().get('sfdc.tabName');
     inventAudit.Status__c='Open';
    // insert inventAudit;
     lstInventWrapper =new List<InventWrapper> ();
      for(Asset indetail:invent)
       {
           InventWrapper w = new InventWrapper();
           w.ind=indetail;
           //w.PhysicalCount = null;
           w.Comments='';
           w.Reason='-None-';
           lstInventWrapper.add(w);
           
           System.debug('The list value@@@@@@@@@@@@@@@: ' + lstInventWrapper);
      }
      
    }  
   else
    {
     ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Select the search condition'));
    }
    
    }
        
Public void Saveasset()
      {
    string sid=inventAudit.id;
     System.debug('The value is@@@@@@@@@@@@@@@: ' + lstInventWrapper.size());
   
       for(Integer i=0;i<lstInventWrapper.size();i++)
       {
          
           
               pc=new Product_Count__c (Name=lstInventWrapper[i].ind.name ,Asset_Barcode__c=lstInventWrapper[i].ind.SerialNumber,Inventory_Audit__c=inventAudit.Id,Product__c=lstInventWrapper[i].ind.Product2Id,Reasons__c=lstInventWrapper[i].ind.Reason1__c,Asset__c=lstInventWrapper[i].ind.id);
                productcount.add(pc);
            
     }
     upsert productcount;
    
  ApexPages.AddMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record entered Successfully.Thank you!'));  
   
  
}


 public class InventWrapper
   {
    public Asset ind {get;set;}
   // public Integer PhysicalCount{get;set;}
    public String Comments{get;set;}
    public String Reason{get;set;}
   }
}


My Testclass:-

@isTest
Private class Auditcontroller_Test
{
 
    
 static testMethod void Testme()
  {
  
   PageReference pageRef = Page.Missmatch;
    Test.setCurrentPage(pageRef);
    
   
    list<Account> acc1=new list<Account>();
    list<Asset> invent1=new list<Asset>();
     
     string sp;
     sp='34563';
     Integer call;
     Id stockdcid;
     String currentStockInventory;
      Id Poid;
      string b;
      b='12345';
   
             
   RecordType RecType = [Select Id, Name, DeveloperName From RecordType  Where SobjectType =: 'Account' and name=:'Dealer'];
            
        Account acc= new Account();
            acc.Name = 'Test Account';
            acc.RecordTypeid = RecType.id;
            acc.Email_Address_POC__c='aksingh028@gmail.com';
            acc.Phone = '7676716272';
            acc.Vat__c=10;
            acc.No_of_Asset__c=20; 
            insert acc;
            
        Contact cc = new Contact();
            cc.LastName = 'Spiderman';
            cc.Email = 'spiderman@gmail.com';
            cc.AccountId= acc.Id;
            insert cc;
            
          Product2 prod = new Product2(Name = 'Laptop X200', 
            Family = 'Standrad');
        insert prod;
            
         Asset asst=new Asset();
            asst.Name='Test Assest';
            asst.AccountId=acc.id;
            asst.ContactId=cc.id;
            asst.Product2Id=prod.id;
            asst.Audit__c='Not present';
            //asst.Purchase_Order__c=po.id;
            Insert asst;
     
       
           
     Inventory_Audit__c invaudit= new Inventory_Audit__c();
           //invaudit.Account__c=acc.id;
           //invaudit.Status__c='Approved';
           invaudit.Status__c='Open';
           invaudit.Audit_Date__c=system.today();
           invaudit.Product__c=prod.id;
          
           Insert invaudit;
           
     ApexPages.CurrentPage().getparameters().put('id',invaudit.id);
      string cid1=ApexPages.currentPage().getParameters().get('id');

         invaudit.Status__c='open';
         List<Inventory_Audit__c> lstcon = new List<Inventory_Audit__c>();  
         
         lstcon.add(invaudit);
         
              
           
     Product_Count__c pc= new Product_Count__c();
           pc.Name='testpc';
           pc.Asset__c=asst.id;
           pc.Inventory_Audit__c=invaudit.id;
           
           insert pc;
           
           
     
     
  Test.startTest();

  Auditcontroller AuditCon= new Auditcontroller(new ApexPages.StandardController(invaudit));
  Auditcontroller.InventWrapper invwrapper=new Auditcontroller.InventWrapper();
     
     invwrapper.Reason= 'None';
     invwrapper.Comments= 'hi';
     invwrapper.ind=asst;
     
     
     
  
  AuditCon.productDetails();
  
  //Asset a =[select id,Audit__c,name,Product2Id,AccountId,SerialNumber,Status,Reason1__c  from Asset where (Audit__c='Not present' And AccountId=:inventAudit.Account__c) OR (Audit__c='' And AccountId=:inventAudit.Account__c)];
  //AuditCon.Saveasset();
  
  Test.stopTest();
  
  }
  }


Please help me where i am doing mistake only i am getting 39% code coverage 
please help me
In my current senarion

I want to trigger for   copying custom field    
accountspecification__c   value to another standard field  SicDesc   

in a same object (Account)  

Please help me.

Thanks In Advance
Hi I my current senarion,

I want to to dispaly all related Account Manager inside Senior Manager in report page .
If i will select Manger  then all related Accunt manger should display in  Visualforce page report.
how many Account maager reporting to senior manger that report i want to create 

So please help me how to create report 


 
Hi i want to create visualforce report there in that report i want to display, inside one Sales Manger how many junior manager is there
IF i will select manager name in report vf page then it should show all related junior manager for that manager.

Plz help me...
Example: invoice amount =1000 then should have to print 
           (one thousands )

plz help me..
Hi, All

In my current scenario, I want to select multiple lookup values in the single lookup field. how to achieve this, please help me. 
  User-added image


Please help me. 
Thanks in Advance.
Hi All,
In my current scenario 
I am having two Object
1. projects__c(Parent object) (In Project object having field ProjectTaskDescription__c, TimesheetStartDate__c, TimesheetEndDate__c  ) 
2. Timesheet__c(Child Object) (In Timesheet object having field  TimesheetDescription__c, Timesheet_Date__c   )

Now  I want to write a trigger on the Parent object(Projects__c) when user will update TimesheetStartDate, TimesheetEndDate and once he will save then related timesheet object(Timesheet_Date__c) field date is between  Project(TimesheetStartDate, TimesheetEndDate )   then  (TimesheetDescription__c ) field  value need to concatenate and display into project object field ( ProjectTaskDescription__c ) ..

Please help me how to write trigger for this.
Please help me to write a trigger on this scenario.


Thanks in Advance.
 
 
Hi in my current scenario case Escalation rule is:-
I want to add one condition if created by user profile equal to QA or Apps then case no need to Escalate but if other then QA, APPS any one create case then it needs to escalate.  So help me how to get this function
my code is below:- 

AND( 
Account.Primary_Project_Manager__r.Manager.Alias = "bgeor", 
$RecordType.Name = "Professional Services", 
Account.Arcot_Internal__c =False, 
NOT( ISPICKVAL(Type, "Duplicate")),NOT( ISPICKVAL(Type, "SOW Request")), 
NOT( ISPICKVAL(Status, "Closed")), NOT( ISPICKVAL(Status, "Duplicate")), NOT( ISPICKVAL(Status, "On Hold")), 
TODAY() >= Expected_Reponse_Date__c)



Thanks,
Hi All,
In my current scenario  I am having 3 objects.
1. Projects__c
2. Opportunity
3. Timeshaeet__c
 Project__c is lookup to opportunity and Timesheet __c object.
 opportunity is lookup to Timesheet__c object. so now if I am creating a timesheet from an opportunity object then both, opportunity and project lookup need to auto fill.
my Query screen shot


Hi Please provide me a trigger for my query.

Thanks,
Amit
Hi All,

In my current scenario, I am having  50 users in my organization, 10 are in the US, 20 are in the UK, 20 are in India. every user is using his own time zone. 
if I am creating one record using Object Name "test_object__c " then I want one field that stores GMT time zone for all user, if the user is in the US or, the UK, or in India.

if "target_date___c" date field stores according to all users time zone but I want to convert all time zone that store in target date field should convert into GMT and stores into  "ConvertedDateField_with_GMT__c" field.


Please help me.

Thanks in advance.
 
 
Hi All i am getting error when i am moving trigger using change set from sandbox to production.

I have created change set and when i want to upload that time i am getting this error please tell me solution for this error.
Error:-
All components failed Version Compatibility Check.
Every component in this change set requires the "37.0" or higher platform version. Please select an organization with a platform version of "37.0" or higher.


Plz help me 
Thanks..
 
My controller:-

public class Auditcontroller
{
       public Auditcontroller(ApexPages.StandardController controller) {
       inventAudit=new Inventory_Audit__c();
       productcount=new List<Product_Count__c>();
       poid=ApexPages.currentPage().getParameters().get('id');

       productcount=new List<Product_Count__c>();
       
       if(poid !=null)
       {
       
       inventAudit=[select name,Account__c,Status__c,Audit_Date__c,product__c from Inventory_Audit__c where id=:poid];
       }
       
       ps=inventAudit.Account__c;
       p=new Product2();
    }
 public Product2 p{get;set;}
 public list<Account> acc{get;set;}
 public list<Asset> invent{get;set;}
 public Inventory_Audit__c inventAudit{get;set;}
 public List<Product_Count__c> productcount;
 public List<InventWrapper> lstInventWrapper {get;set;}
 public Product_Count__c pc{get;set;}
 Public string sp{get;set;}
 public Integer call{get;set;}
 public Id stockdcid {get;set;}
  public String currentStockInventory{get;set;}
 Public Id Poid{get;set;}
public Asset ass{get;set;}
public string ps;

 public void  productDetails() //on click 'Go' button based on seach condition displaying inventory details on page
  {
   if( inventAudit.Account__c!=null && inventAudit.Status__c=='open')
   {
     invent=[select id,Audit__c,name,Product2Id,AccountId,SerialNumber,Status,Reason1__c  from Asset where (Audit__c='Not present' And AccountId=:inventAudit.Account__c) OR (Audit__c='' And AccountId=:inventAudit.Account__c)];
     
      currentStockInventory=apexpages.currentpage().getparameters().get('sfdc.tabName');
     inventAudit.Status__c='Open';
    // insert inventAudit;
     lstInventWrapper =new List<InventWrapper> ();
      for(Asset indetail:invent)
       {
           InventWrapper w = new InventWrapper();
           w.ind=indetail;
           //w.PhysicalCount = null;
           w.Comments='';
           w.Reason='-None-';
           lstInventWrapper.add(w);
           
           System.debug('The list value@@@@@@@@@@@@@@@: ' + lstInventWrapper);
      }
      
    }  
   else
    {
     ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Select the search condition'));
    }
    
    }
        
Public void Saveasset()
      {
    string sid=inventAudit.id;
     System.debug('The value is@@@@@@@@@@@@@@@: ' + lstInventWrapper.size());
   
       for(Integer i=0;i<lstInventWrapper.size();i++)
       {
          
           
               pc=new Product_Count__c (Name=lstInventWrapper[i].ind.name ,Asset_Barcode__c=lstInventWrapper[i].ind.SerialNumber,Inventory_Audit__c=inventAudit.Id,Product__c=lstInventWrapper[i].ind.Product2Id,Reasons__c=lstInventWrapper[i].ind.Reason1__c,Asset__c=lstInventWrapper[i].ind.id);
                productcount.add(pc);
            
     }
     upsert productcount;
    
  ApexPages.AddMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record entered Successfully.Thank you!'));  
   
  
}


 public class InventWrapper
   {
    public Asset ind {get;set;}
   // public Integer PhysicalCount{get;set;}
    public String Comments{get;set;}
    public String Reason{get;set;}
   }
}


My Testclass:-

@isTest
Private class Auditcontroller_Test
{
 
    
 static testMethod void Testme()
  {
  
   PageReference pageRef = Page.Missmatch;
    Test.setCurrentPage(pageRef);
    
   
    list<Account> acc1=new list<Account>();
    list<Asset> invent1=new list<Asset>();
     
     string sp;
     sp='34563';
     Integer call;
     Id stockdcid;
     String currentStockInventory;
      Id Poid;
      string b;
      b='12345';
   
             
   RecordType RecType = [Select Id, Name, DeveloperName From RecordType  Where SobjectType =: 'Account' and name=:'Dealer'];
            
        Account acc= new Account();
            acc.Name = 'Test Account';
            acc.RecordTypeid = RecType.id;
            acc.Email_Address_POC__c='aksingh028@gmail.com';
            acc.Phone = '7676716272';
            acc.Vat__c=10;
            acc.No_of_Asset__c=20; 
            insert acc;
            
        Contact cc = new Contact();
            cc.LastName = 'Spiderman';
            cc.Email = 'spiderman@gmail.com';
            cc.AccountId= acc.Id;
            insert cc;
            
          Product2 prod = new Product2(Name = 'Laptop X200', 
            Family = 'Standrad');
        insert prod;
            
         Asset asst=new Asset();
            asst.Name='Test Assest';
            asst.AccountId=acc.id;
            asst.ContactId=cc.id;
            asst.Product2Id=prod.id;
            asst.Audit__c='Not present';
            //asst.Purchase_Order__c=po.id;
            Insert asst;
     
       
           
     Inventory_Audit__c invaudit= new Inventory_Audit__c();
           //invaudit.Account__c=acc.id;
           //invaudit.Status__c='Approved';
           invaudit.Status__c='Open';
           invaudit.Audit_Date__c=system.today();
           invaudit.Product__c=prod.id;
          
           Insert invaudit;
           
     ApexPages.CurrentPage().getparameters().put('id',invaudit.id);
      string cid1=ApexPages.currentPage().getParameters().get('id');

         invaudit.Status__c='open';
         List<Inventory_Audit__c> lstcon = new List<Inventory_Audit__c>();  
         
         lstcon.add(invaudit);
         
              
           
     Product_Count__c pc= new Product_Count__c();
           pc.Name='testpc';
           pc.Asset__c=asst.id;
           pc.Inventory_Audit__c=invaudit.id;
           
           insert pc;
           
           
     
     
  Test.startTest();

  Auditcontroller AuditCon= new Auditcontroller(new ApexPages.StandardController(invaudit));
  Auditcontroller.InventWrapper invwrapper=new Auditcontroller.InventWrapper();
     
     invwrapper.Reason= 'None';
     invwrapper.Comments= 'hi';
     invwrapper.ind=asst;
     
     
     
  
  AuditCon.productDetails();
  
  //Asset a =[select id,Audit__c,name,Product2Id,AccountId,SerialNumber,Status,Reason1__c  from Asset where (Audit__c='Not present' And AccountId=:inventAudit.Account__c) OR (Audit__c='' And AccountId=:inventAudit.Account__c)];
  //AuditCon.Saveasset();
  
  Test.stopTest();
  
  }
  }


Please help me where i am doing mistake only i am getting 39% code coverage 
please help me
In my current senarion

I want to trigger for   copying custom field    
accountspecification__c   value to another standard field  SicDesc   

in a same object (Account)  

Please help me.

Thanks In Advance