• Bhatia
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 13
    Replies

Showing Error:

 

Its test coverage is 0% , it should be at least 1%.

 

Any help will be appreciated

 

Thanks

After 15 minutes of inactivity on the page, I need to fire a Trigger which can refresh the page, so that I can avoid the timeout error.

I am getting Invalid Query Locator Error and it showing 5 limit per user. To avoid this error I want to get some workaround or if it can achieved by jquery. please assist me in solving this.

 

Any help will be appreciable.

 

Thanks

how can i write a trigger to change the first letter capital for  existing  first name and last name on the Contact standard object.

 

Any help will be appreicable.

 

Thanks

 

In the Test class , I need to complete the Test coverage for a Trigger on QuoteLineItem. When I am inserting a QuoteLineItem like

insert Qli;

 

then trigger is firing on the before insert event.

 

when i am debugging the System.debug(Trigger.new), it is not reading the List Price (Read only field) so that I am unable to cover the Test coverage for a Trigger. As this field is automatically getting the value from unit price field of PriceBookEntry.

 

Please it is urgent for me......

 

Any comment will be appreciated.

 

Thanks


 I am running the Trigger in which i m trying to debug the "Trigger.new" in which i am not able to see the listprice field of QuoteLineItem. All other fields are displaying but not the listprice field.  It is read only field. I am getting the value from PriceBookEntry's unitprice field into the listprice field of QuoteLineItem.  When I am checking the QLI(QuoteLineItem)

has been inserted. I am able get the value in listprice field but it is not displaying in the Trigger.new. By this i am not able to do my Test Coverage 100%. It is just coming 47%.

Any help will be appreciated in this regard.

 

Trigger

---------------------

trigger SampleTestTrigger on QuoteLineItem(before insert, before update)
{

for(QuoteLineItem li: Trigger.new){
if(li.listprice!=null)
{
If(li.unitprice!=null){
if(li.discount==null)
{
-- some code here--
li.unitprice=li.listprice;
}
}
}
}

 

Test Class

------------

 

PricebookEntry pbe=new PricebookEntry();
pbe.Pricebook2Id=pb.id;
pbe.Product2Id=p.id;
pbe.IsActive=true;
pbe.UnitPrice=10;
insert pbe;


QuoteLineItem qli = new  QuoteLineItem();
qli.quoteId=q.id;
qli.pricebookentryid=pbe.id;
qli.quantity=1;
qli.unitprice=5;
qli.discount=0.02;
insert qli;

qli.discount=null;
Test.startTest();
update qli;
Test.stopTest();

 

// checking the QLI has been inserted

 

for(QuoteLineItem y :[select discount,unitprice,listprice from quotelineItem where createdDate=Today and unitprice=5])
{

// here value of listprice coming
}

 

Anybody is able to control the behavior of apex listviews component within the apex tabpanel

this is the code if i take some number of tabs within the tabpanel and using the listviews component within the tab component  and try to click any of the filters like A,B,C,..... etc or next or previous link , my page get refreshes and it lands to default tab of tabpanel showing unexpected behavior of tab within one apex page. this is the code. Any comment will be appreciated.

<apex:page showHeader="false">
   <apex:tabPanel switchType="client" id="tabpanel">
   <apex:tab label="TAB 1" id="object1">
   <apex:ListViews type="Case"/>
   </apex:tab>    
 
    <apex:tab label="TAB 2" id="object2">
            <apex:listViews type="account"/>
    </apex:tab> 
    </apex:tabPanel>
</apex:page>

 

Thank you

After 15 minutes of inactivity on the page, I need to fire a Trigger which can refresh the page, so that I can avoid the timeout error.

I am getting Invalid Query Locator Error and it showing 5 limit per user. To avoid this error I want to get some workaround or if it can achieved by jquery. please assist me in solving this.

 

Any help will be appreciable.

 

Thanks

how can i write a trigger to change the first letter capital for  existing  first name and last name on the Contact standard object.

 

Any help will be appreicable.

 

Thanks

 

In the Test class , I need to complete the Test coverage for a Trigger on QuoteLineItem. When I am inserting a QuoteLineItem like

insert Qli;

 

then trigger is firing on the before insert event.

 

when i am debugging the System.debug(Trigger.new), it is not reading the List Price (Read only field) so that I am unable to cover the Test coverage for a Trigger. As this field is automatically getting the value from unit price field of PriceBookEntry.

 

Please it is urgent for me......

 

Any comment will be appreciated.

 

Thanks

Anybody is able to control the behavior of apex listviews component within the apex tabpanel

this is the code if i take some number of tabs within the tabpanel and using the listviews component within the tab component  and try to click any of the filters like A,B,C,..... etc or next or previous link , my page get refreshes and it lands to default tab of tabpanel showing unexpected behavior of tab within one apex page. this is the code. Any comment will be appreciated.

<apex:page showHeader="false">
   <apex:tabPanel switchType="client" id="tabpanel">
   <apex:tab label="TAB 1" id="object1">
   <apex:ListViews type="Case"/>
   </apex:tab>    
 
    <apex:tab label="TAB 2" id="object2">
            <apex:listViews type="account"/>
    </apex:tab> 
    </apex:tabPanel>
</apex:page>

 

Thank you

The page you submitted was invalid for your session. Please click Save again to confirm your change.

 

 

 

What does this error mean.It is a visuval force error it is happned after package the application.In unmanaged code it is working fine .

  • June 19, 2009
  • Like
  • 0