• Pavan Kemba
  • NEWBIE
  • 10 Points
  • Member since 2015
  • Software Engineer
  • Textron

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 10
    Replies
I have a custom button and have implemented onClick Javascript as below
var url = '{!myvar}'
if (url != '') {
if({CONTAINS(url,"+")}){
{SUBSTITUTE(url, "+","%2B") }
}
  window.open(url);
} else {
  alert('Report URL was not found.');
}

But on click of the button i get the follow error
A problem with the OnClick JavaScript for this button or link was encountered:

Unexpected string literal "+". Expected a parameter pattern or a ')' in parameter list.

Please help me fixing this.

I have a requirement to generate PDF for list of Object.

I have a button and on click of it this there are certain Records inserted and i have to display these inserted records in a PDF.

I have a controller that returns list of ids, now i want to display these on PDF.

For Ex:
 

acctlist = [SELECT id FROM Account WHERE Account.Country='INDIA'];
Lets say this acctlist has 10records and details of these should be displayed in PDF. Each record, new Page.

How do i accomplish this. I have a VF Page renderedas PDF i dont know how to proceed further.
The OrderItem trigger is not firing when there is bulk data from SAP.

Help required immediately
 
We have a object called OrderItem for Order.
  • I have written a trigger on OrderItem Object to update the object.
  • When i try updating from Salesforce UI, the trigger is invoked.
  • But when the data is from External System [SAP in my case], the trigger is not invoked.

Below is the Trigger Code:
trigger OrderLineTrigger on OrderItem (after insert,before update,before insert,after update) {
	OrderLineHandler objlineHandler = new OrderLineHandler();

if(Trigger.IsBefore || Trigger.IsUpdate)
{
   objlineHandler.beforeInsertUpdate(Trigger.new,Trigger.oldMap);
}
}


Please help me on this.
Hi All,
I get the above error when creating Case.

So we have a Cases Portal designed for Customers. When they use it and create cases there are no errors. But if i login as any Internal User and try to create a Case i see the above error.

I tried making the class "without sharing" which did not work.

Could someone please help me.

 
I have a custom button and have implemented onClick Javascript as below
var url = '{!myvar}'
if (url != '') {
if({CONTAINS(url,"+")}){
{SUBSTITUTE(url, "+","%2B") }
}
  window.open(url);
} else {
  alert('Report URL was not found.');
}

But on click of the button i get the follow error
A problem with the OnClick JavaScript for this button or link was encountered:

Unexpected string literal "+". Expected a parameter pattern or a ')' in parameter list.

Please help me fixing this.

I have a requirement to generate PDF for list of Object.

I have a button and on click of it this there are certain Records inserted and i have to display these inserted records in a PDF.

I have a controller that returns list of ids, now i want to display these on PDF.

For Ex:
 

acctlist = [SELECT id FROM Account WHERE Account.Country='INDIA'];
Lets say this acctlist has 10records and details of these should be displayed in PDF. Each record, new Page.

How do i accomplish this. I have a VF Page renderedas PDF i dont know how to proceed further.
The OrderItem trigger is not firing when there is bulk data from SAP.

Help required immediately
 
We have a object called OrderItem for Order.
  • I have written a trigger on OrderItem Object to update the object.
  • When i try updating from Salesforce UI, the trigger is invoked.
  • But when the data is from External System [SAP in my case], the trigger is not invoked.

Below is the Trigger Code:
trigger OrderLineTrigger on OrderItem (after insert,before update,before insert,after update) {
	OrderLineHandler objlineHandler = new OrderLineHandler();

if(Trigger.IsBefore || Trigger.IsUpdate)
{
   objlineHandler.beforeInsertUpdate(Trigger.new,Trigger.oldMap);
}
}


Please help me on this.
Hi All,
I get the above error when creating Case.

So we have a Cases Portal designed for Customers. When they use it and create cases there are no errors. But if i login as any Internal User and try to create a Case i see the above error.

I tried making the class "without sharing" which did not work.

Could someone please help me.