• David Somekh
  • NEWBIE
  • 10 Points
  • Member since 2006
  • CRM Manager
  • SolidCAM

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 44
    Questions
  • 14
    Replies
We changed the list price of a product, and we don't want to enable sales people to still use the old price.
We dont allow changing the sales price (Profile permission) but this protects only creation of new opportunities.
If a user clones a previous record, the old prices remain.
How can I fix this?
I have a visual force page that uses the apex:repeat to loop through the Opportunity line items. B

ut the order is not as it displayed in the Opportunity. I

can check the SortOrder value of the line item, but this value is updated only when the user clicks the "Sort" button.

Questions:
  1. Is there a way to get items as they are displayed in the opp?
  2. If not, can I trigger the SortOrder value to be updated without the sort button?
var ProductsArr = new Array();

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="lineitem"> var product_row = {name:"{!lineitem.product2.name}", quantity:{!lineitem.quantity}, ID:{!lineitem.product2.Hasavshevet_product_ID__c},price:{!lineitem.UnitPrice}};

console.log("{!lineitem.SortOrder}"); ProductsArr.push(product_row);
</apex:repeat>

Example
 Hello Experts!

I need to create a new user that has the ability to create Opportunities and add products, but not see the product prices.

I am facing several difficulties with this task:

1.Opportunity Products - The field "Sales price" cannot be removed from the Multi-line layout.
2.Opportunity Products - The field "Sales price" cannot be hidden in the Field-level security.
3.Price Book Entries - There is only one "search layout" for all users.
4.Price Book Entries - The field "List Price" cannot be hidden in the Field-level security.

How can I solve it?

Thanks,
David
Hello Apex experts!

After a recent scheduled maintenance of SalesForce, we have a batch apex that no longer runs.

The batch is scheduled for every morning on 07:00 AM, and no other batches are running at the same time. (We also have a batch that runs on 00:00).

What wierd is that if we schedule it to run one time it does run and also it runs if we fire it from the code.

Below is the code that excutes the batch.

Any ideas? Thanks!
global void execute(SchedulableContext  SC){
           Messaging.Singleemailmessage mail = new Messaging.Singleemailmessage();
        mail.setHtmlBody(htmlBody());
        mail.setToAddresses(new list<string>{'emil.somekh@solidcam.com','eddie.pevzner@solidcam.com','natalie.somekh@solidcam.com','david.somekh@solidcam.com'});
        mail.setSubject('SolidCAM seats summary report');
        Messaging.sendEmail(new Messaging.Singleemailmessage[] { mail});
        return;
    }
 

Hello Developers,

What is the best envoirement of writing apex code?

Do you I have to download eclpise and to install Force.com IDE?

Thanks,

David

Hello SalesForce experts,

 

We have a limit of 1500 mass emails per day. (We were intially limited to 1000, we asked to increase this)

 

Now 1500 is not enough for us, we need to increase this size.

 

Is this a money issue? Is it possible to increase the limit over 1500?

 

Thanks,

David

Hello Apex Experts!

 

I have an attachment in a SalesForce record that I want to send to an external server, which is running PHP and this server needs to encrypt the file and then send it back to me.

 

What is the best method to accsess the record attachment and then send it to the server?


Thanks,

David

Hello Apex experts!

 

I need to be able to get the link of an attachment and download the file to a diffrent server. On the record that has the attachment, I need to have a button that triggers this.

 

Is there some way to loop all the attachments in the record?

 

 

Thanks,
David

When I try to deploy or save to server, nothing happens.

I don't get any errors, but the trigger Im trying to change wont change.

What can be the problem?

Thank You,

Rinat.

Hello Apex developers!

 

I need to be able to update SalesForce fields from an external system, can you guide me how to get started and provide me a code sample or something?

 

Any help would be greatly appreicaited.

 

Thank you in advance,

David

We have Google AdWords account and we want to see in Saleforce the leads that we got from it.

 

When we click on "Google AdWords setup" we get the next massage:

 

"Your approval is now required:

 

Log into AdWords and approve

 

Look for a notice at the top of the screen that indicates your intent to link this AdWords account.

Select Yes, I accept"

 

When we log into our account in Google AdWords we don't have the notice.

 

Does somebody know why we can't see the message, and how can we connect between the Salesforce to Google AdWords and see the leads we got from it?

 

 P.S

In the past we had this opportunity and we could see which leads we get from the AdWords, but it stopped working.

 

Thank you.



I have field that is lookup field to contact.

 

I want to send Email alert to the contact that in this field when this field is update and the contact is changed.

 

Hope somebody knows some formula that checks if the values in the field was changed in order to use it as a trigger?  

 

Thank you

Hi all.

Well a strange case, for sure!

 

I have a trigger on Lead which is benn fired before entering lead to the system.

The trigger does not allowes to put in the system 2 leads with the same email address.

 

when entering manualy leads to the system trigger never allowes 2 tlead with the same emai.

SO standing alone the trigger seems to work.

 

I use web2lead program to get data about users that sunscribe to the website.

So the leads enter to my salesforce system mostly by web2lead.

It seems that is some casses the trigger is not fired / no working.

 

I still have some casses with duplicate emails.

By the way, there are duplicate which are not allowed.

It seems like sometimes the trigger work and some don't.

 

Any ideas? Has someone had the same issue?

 

Thanx!

Hello all.

 

It looks like SF bug.

In spite Account is the private object, my PRM users can see Accounts of other Users

by simple clicking on "View Hierarchy" link.

 

Someone has an idea how i can remove this link from Account page layout on the quickiest way?

 

Thank you in advance!

 

Hello Apex Experts!

 

I am having problems with code covrage with a test method of an external package we installed. When I open my Force.com IDE i do not see this code and i am unable to edit it. I found the class in SalesForce itself and also I see that there is the option to "Download" it but I am not sure wheter it's possible to import this .cls file into my Force.com IDE envoirement.

 

Any help will be greatly appreciated.

 

Thank you in advance,

David

Hello Apex Experts!

 

I am having problems with code covrage with a test method of an external package we installed. When I open my Force.com IDE i do not see this code and i am unable to edit it. I found the class in SalesForce itself and also I see that there is the option to "Download" it but I am not sure wheter it's possible to import this .cls file into my Force.com IDE envoirement.

 

Any help will be greatly appreciated.

 

Thank you in advance,

David

Hi All,

SO I have generated a simple WSDL file with VS2005.

When I try to import it into salesforce I get the error:

Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported
  <?xml version="1.0" encoding="utf-8" ?> 
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://minciTest.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://minciTest.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://minciTest.org/">
- <s:element name="HelloWorld">
  <s:complexType /> 
  </s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:schema>
  </wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
  <wsdl:part name="parameters" element="tns:HelloWorld" /> 
  </wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
  <wsdl:part name="parameters" element="tns:HelloWorldResponse" /> 
  </wsdl:message>
- <wsdl:portType name="Service1Soap">
- <wsdl:operation name="HelloWorld">
  <wsdl:input message="tns:HelloWorldSoapIn" /> 
  <wsdl:output message="tns:HelloWorldSoapOut" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="HelloWorld">
  <soap:operation soapAction="http://minciTest.org/HelloWorld" style="document" /> 
- <wsdl:input>
  <soap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="Service1Soap12" type="tns:Service1Soap">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="HelloWorld">
  <soap12:operation soapAction="http://minciTest.org/HelloWorld" style="document" /> 
- <wsdl:input>
  <soap12:body use="literal" /> 
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="Service1">
- <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
  <soap:address location="http://localhost:51892/Service1.asmx" /> 
  </wsdl:port>
- <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
  <soap12:address location="http://localhost:51892/Service1.asmx" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

 

The code was Copied & Pasted...

 

Thank you So much!

 

Hi all,

I am using VS2005 - How can I create an WDSL file of it?

I want Salesforce to Connect my WebService/

Thanks,

Hi all,

I saw an Example using Content in Java code.

It turns out that I can not access Content that way also in C# anybody knows how can I access Content using C#?

Thanks,

Hi Apex experts,

Looking at Attachment declaration I noticed that Body field is of type Base64.

The Body is an encoded data of a file.

Now, How can I decode the Body data? So I'll get the original contents of the file (it may be in bytes because I can use convert).

 

Another question.

Lets' say that I have the files data. How can I pass its data to me WebService written in C#? (what kind of type shall I use?)

 

Thank you so much!

 

 

We changed the list price of a product, and we don't want to enable sales people to still use the old price.
We dont allow changing the sales price (Profile permission) but this protects only creation of new opportunities.
If a user clones a previous record, the old prices remain.
How can I fix this?
Hello Apex experts!

After a recent scheduled maintenance of SalesForce, we have a batch apex that no longer runs.

The batch is scheduled for every morning on 07:00 AM, and no other batches are running at the same time. (We also have a batch that runs on 00:00).

What wierd is that if we schedule it to run one time it does run and also it runs if we fire it from the code.

Below is the code that excutes the batch.

Any ideas? Thanks!
global void execute(SchedulableContext  SC){
           Messaging.Singleemailmessage mail = new Messaging.Singleemailmessage();
        mail.setHtmlBody(htmlBody());
        mail.setToAddresses(new list<string>{'emil.somekh@solidcam.com','eddie.pevzner@solidcam.com','natalie.somekh@solidcam.com','david.somekh@solidcam.com'});
        mail.setSubject('SolidCAM seats summary report');
        Messaging.sendEmail(new Messaging.Singleemailmessage[] { mail});
        return;
    }
 

Hello Apex developers!

 

I need to be able to update SalesForce fields from an external system, can you guide me how to get started and provide me a code sample or something?

 

Any help would be greatly appreicaited.

 

Thank you in advance,

David

We have a Web2Lead form, with many products. 

Leads use to fill in the form interested in one of the products “xx” , but it is pretty normal that a few days later they fill in the form interested in other product(s)

 

On the leads page, I do have a related list called "xx"

 

I have a trigger that creates a new "xx" for each product the lead has asked for

 

The issue is that the second time a lead fills the form, Salesforce creates a duplicate lead, and then I have to merge them…..

 

How can I create a trigger that will look at the lead email address and then if the lead already exists update only the empty fields and add a line item to the related list? avoiding duplicates?

 

Thank you

  • September 12, 2011
  • Like
  • 0

Hi all.

Well a strange case, for sure!

 

I have a trigger on Lead which is benn fired before entering lead to the system.

The trigger does not allowes to put in the system 2 leads with the same email address.

 

when entering manualy leads to the system trigger never allowes 2 tlead with the same emai.

SO standing alone the trigger seems to work.

 

I use web2lead program to get data about users that sunscribe to the website.

So the leads enter to my salesforce system mostly by web2lead.

It seems that is some casses the trigger is not fired / no working.

 

I still have some casses with duplicate emails.

By the way, there are duplicate which are not allowed.

It seems like sometimes the trigger work and some don't.

 

Any ideas? Has someone had the same issue?

 

Thanx!

Hello all.

 

It looks like SF bug.

In spite Account is the private object, my PRM users can see Accounts of other Users

by simple clicking on "View Hierarchy" link.

 

Someone has an idea how i can remove this link from Account page layout on the quickiest way?

 

Thank you in advance!

 

Hi all,

I saw an Example using Content in Java code.

It turns out that I can not access Content that way also in C# anybody knows how can I access Content using C#?

Thanks,

Hi Apex experts,

Looking at Attachment declaration I noticed that Body field is of type Base64.

The Body is an encoded data of a file.

Now, How can I decode the Body data? So I'll get the original contents of the file (it may be in bytes because I can use convert).

 

Another question.

Lets' say that I have the files data. How can I pass its data to me WebService written in C#? (what kind of type shall I use?)

 

Thank you so much!

 

 

Hello Apex Wizards (-: I

 

I have an annoying problem.

 

In our system we have an object called “Dongles” and this object has a reference field(Lookup Relationship) to the account object named customer_c.

 

I have a case on dongle save where I need to take a value from the account related to it and put it in the dongle record.

 

I am assuming it’s possible to get the data of the account(that is related to the dongle) without doing an extra query (As we know, apex is very cheap on queries :smileyvery-happy:) but when I try to get a pointer to the account object using the syntax below I get a null object.

 

Account AccountPointer = dongleToSync.Customer__r;

 

Anyway, I figure there is a way to get over this hump without making an extra query. But I could be wrong )-:

 

Any help will be greatly appreciated….

Hi All

I created a workflow rule for Activity.

But when i click on Ad Workflow Action i can't see there Email Allert option.

May be sameone knows what is the reason, and what is the way folow up Email for Tasks or Events?

Thanks in advance!

Hello All!

 

I have a problem when I want to delete incorrect email addresses from lead records.

 

After we did a mass email using salesforce we found out that a lot of the email's are incorrect. In-order to delete these email addresses we have to import blank fields.

 

But SalesForce does not let you import blank fields. If you import a blank field, the field will not be updated and it will stay at it's old version.

 

This applies to the built in import wizard and also to the data loader(update/upsert options).

 

Any help will be greatly appreciated.

 

 

 

 

Hi,
I wrote query in JavaScript and I get this message: "unterminated string constant".
I think it happens because the line break (maybe not).
How can i solve it?
 
the query:
var records = sforce.connection.query("select Date_Of_Order__c,
from Dongle__c,
where (Name = 'dongNum')");
 
Thanks,
Chen