Ask Search:
Birthe OelmannBirthe Oelmann 
I need the number of specific campaigns a lead is associated with to appear as a number on the lead object.
Other than using the Roll Up helper or the declarative-lookup-rollup-summaries, could this be achieved with a flow?
I need to have 3 different numbers 1 for Campaigns that have Event in their name, one with Webinars and one for Downloads
Thank you
Best Answer chosen by Birthe Oelmann
Matt GraderMatt Grader
Hi Birthe.  If you used flows you would not be able to decrease the count if a lead was removed from a campaign.  (you cannot trigger a flow based on record deletion).   You may also hit flow limits over time.    The other option is to write a small apex trigger to calculate these fields.
Sushma RamakrishnanSushma Ramakrishnan 
FIELD_INTEGRITY_EXCEPTION: Price Book Entry ID: id value of incorrect type: 01s80000000BMxaAAG.

Create one QuoteLineItem record where:
PricebookEntryId = {!myVariable_current.Pricebook2Id} (01s80000000BMxaAAG)
Product2Id = 01t800000039uwm
Quantity = 1
QuoteId = {!myVariable_current.Id} (0Q01g0000005L6tCAE)
UnitPrice = 550
Failed to create record.

Kindly Help to Solve This Error...
Thanks for Any Help...!
Best Answer chosen by Sushma Ramakrishnan
Matt GraderMatt Grader
Hi Sushma.  The error message is saying that there is an issue with the PricebookEntryId = {!myVariable_current.Pricebook2Id} (01s80000000BMxaAAG) line.  
  Can you try to view the 01s80000000BMxaAAG object in Salesforce?   You will want to validate that that it is a valid for the PricebookEntryId field type. 
Rinat BRinat B 

I have the following Sharing settings:
Account = Parent Account
Deal - Child 
how can I make a sharing rule so that my users can edit the deal only if they are the Account owners of the account related to the deal?
User-added image
Best Answer chosen by Rinat B
Nick SauerNick Sauer
Hi Rinat - what is your sharing setting at Account level?  If you associate as detail to master Standard object, you're going to have "Controlled by Parent" defaulted in Sharing Settings.  You could change it, but sounds like you should leave it if your Account object is locked down - for example as Private or Public Read Only, then I believe your requirement is met.  If you Account is Public Read/Write, then you could set the custom object to Private and set up sharing rule based on Account Owner or some other criteria.
Rinat BRinat B 

I have 2 objects:
Account - Parent
Deal - Child

I want to give some of my users permissions to edit spefic fields in the Deal layout, ONLY if the account that the deal is connected to is owned by them., meaning Do not let them edit the Deal fields if you are not the Owner of the account.

sorry for asking this questions many times in the community
Thank you
Best Answer chosen by Rinat B
Amnon KruviAmnon Kruvi
Hi Rinat,

It seems like you need to set up a sharing model for the Deal object. May I ask, are you using a Lookup or a Master-Detail relation between Deal and Account?

If you're using a lookup, then all you need to do is go to Sharing Settings in the setup page, and set the org-wide default for the Deal object to "Public Read Only". You could then untick the Grant Using Hierarchies checkbox if you don't want a user's manager to also be able to edit deals.

If you're using a M-D relation, then sharing becomes dependent on the Account object. Basically anyone with write access to the account will have write access to deals.
Cody SandersCody Sanders 
I have a process builder referencing a date formula field and it's taking that to update a normal date field so I can use that in another formula without going over the character limit,but for some reason it's taking "12/31/9999" and returning "Fri Dec 31 00:00:00 GMT 9999". How do I fix this? Here's the error below for reference:

The flow tried to update these records: null. This error occurred: FIELD_INTEGRITY_EXCEPTION: Expected Endcap Completion: invalid date: Fri Dec 31 00:00:00 GMT 9999. You can look up ExceptionCode values in the SOAP API Developer Guide.
Best Answer chosen by Cody Sanders
Cody SandersCody Sanders
Sorry, I forgot to mark this as solved. I found out it was because the process builder was trying to use the date 12/31/9999 to run the formulas, so I added an additional criteria to have the process builder not run when there's not a ship date entered and so far there hasn't been a problem.
Saurabh SinghSaurabh Singh 

I recently installed and configured Marketing cloud connect on my Sales cloud. I tested the connection as well, since I am able to send marketing cloud emails directly though Salesforce it all looks in place. Though I wanted to know if following is possible:

1) I have created Data extenions matching with my Salesforce istance ( Account, contacts, Opportunites, Order and Order products etc). How can I have CRM data sync to Marketing cloud in those Data extnesions.
2) Can I have data updated on those Data extenions in Marketing cloud and have it sync back to CRM?

Overall, apart from email functionality what all do I get after installing Marketing Cloud connect?

Saurabh Singh
Best Answer chosen by Saurabh Singh
Saurabh SinghSaurabh Singh
I figured out an answer fo this, we need to go to Contact builder-> Data sources-> Synchronized-> Add the objects thats need to be synced from Salesforce to Marketing cloud-> Select poll frequnecy and thats it all the objects are available on Marketing cloud now.
Safwan BurkiSafwan Burki 
Hi guys,

I work in the advertising industry whereby our company works with media agencies. These media agencies work on behalf of brands. For example: the Media Agency is WPP who work on behalf of Coca Cola.

I was wandering what do you reckon is the best way to create a record for both media agencies and brands whereby the media agency is the child and the brands are the parent. So if my managers wanted to see which media agencies worked with Coca Cola, or which brand worked with WPP etc they can? 

In some instances we don't work with a media agency and work directly with a brand, so what would you recommend on how I should go about recording this. Should I create separate objects for Media Agencies and Brands or is there a way to keep them in one place?
Best Answer chosen by Safwan Burki
Amit SinghAmit Singh
Hi Safwan,

Why you do not go for Account-Contact Object because this already maintained the Parent-Child Relationship where Account is Parent and Contact is Child.

Also, Account have self-lookup relationship with Account so you can also use the Account Object itself.

I will suggest using Account and Contact.

Lindsay WhitbreadLindsay Whitbread 
I have turned on the New Notes and unable to search for Notes in Reports through File and Content Report. How do you report on the New Notes?
Best Answer chosen by Lindsay Whitbread
Lindsay WhitbreadLindsay Whitbread
I did follow the guide from Create a Report on Your Notes ( and my report showed blank. This morning, I removed all the fields that the report is filled with by default and just kept the set of fields per the guide, and that did it!

Then I added back all the fields and discovered that the New Notes won't show if you have below fields selected:
  • Downloaded By
  • Download Date
  • Download User Type
  • Link Name
  • Link Created Date
  • Link Expiration Date
  • Password Protected Link
  • Link Last Accessed Date
  • Total Link Accesses
JP GrandclémentJP Grandclément 
Hi all,

I read a lot of subjects related with my issue and try many different things but still can'tfigure it out. The aim is to automatically attach pdf file when generating it. I'm currently not far from this but I'm starting to loosing myself.
- I created a custom Object Audit__c which contains all the information for the PDF.
- I added a custom button which call a VisualForce page :
<apex:page action="{!saveAttachement}" controller="Audit" renderAs="pdf" applyBodyTag="false" applyHtmlTag="false" showheader="false" standardStylesheets="false">
        <apex:form >

<!-- Content -->

this is My method saveAttachment() in my Audit.apxc class 
public with sharing class Audit {
    public void saveAttachement() {                        
        PageReference pdf = Page.VF014_Audit;
        pdf.getParameters().put('Compte_associ__c', parentId);
        Attachment attach = new Attachment();
		Blob body;
         try {

        // returns the output of the page as a PDF
             body = pdf.getContent();
        //system.debug('body should be fine');

        // need to pass unit test -- current bug    
        } catch (VisualforceException e) {            
            system.debug('in the catch block');
             body = Blob.valueOf('Some Text');
        attach.Body = body;
		// add the user entered name
    attach.Name = myAudit.R_f_rence_Audit__c + '.pdf';
    attach.IsPrivate = false;
    // attach the pdf to the account
    attach.parentId = myAudit.Compte_associ__c;
    insert attach;

Currently, the attachement is being saved, but can't be opened (PDF failed to open).

By converting it in html file, I could catch the error "Some text" which means I'm not in the try bloc. I assume the reason is the getContent() method is not working and this might probably be because of the PageReference pdf = Page.VF014_Audit being null or something.

Please, can someone help me finding the light ?

I tried a few things now, like with a clone VF page which generated the pdf but didn't success.

I also posted it on developer community :

Thank you for your help,

Best Answer chosen by JP Grandclément
Amnon KruviAmnon Kruvi
Well, your page VF014_Audit usually receives some sort of parameter in order to know what audit to show. Just like the page we're on now has the part "?id=9063A000000Dvyb" at the end of the URL - this tells the page what question to show.

When you added the following line:
pdf.getParameters().put('Compte_associ__c', parentId);
You are telling the page "Compte_associ__c" is equal to ParentId. Now, the controller class (a class called Audit) is probably expecting some sort of ID to be sent in this manner, and queries the audit record according to the value you put in there. This is all just a guesstimate without being able to see the actual code, though.

Now, I'm guessing that your variable ParentId is either empty, or has the wrong value for what the Audit class is looking for.

I recommend adding a system.debug for ParentId, then use the debug logs to see what value is actually in it. If it isn't empty, then check the Audit class to see what value it expects - because the query it runs is not returning any results.
Richard AndrewRichard Andrew 
I need some help please.

I have a custom picklist field on the Contact object that I want to use as a status field, but I can't work out the best way to update the field using workflow.

This is how I would like the status field (in italics) to update:
  1. Contact Record Type of ABC is created = Applied
  2. Contact submits Case record = Waiting List
  3. Contact is added to Campaign as Campaign Member = Invited
  4. Contact has not submitted a Case for more than X months = Limbo
The first stage is fine, but I'm stuck with everything else. I have Cases as a related list on the Contact object, but can't seem use this relationship using workflow.
Best Answer chosen by Richard Andrew
Deepak AnandDeepak Anand
All of this should be doable with a Process instead of a Workflow. As far as Workflows are considered, these can do Field Updates(especially Cross Object) only if the Child is related to the Parent via Master-Detail Relationship. But in case of Contact and Case I don't think that is the case and which is why it doesn't allow you to do so.

But with Processes, you can do this. Irrespective of the type of Relationship between Parent and Child, Updated Records action in Processes allows you to update even Parent records that are related to the Child via a Lookup type of relationship.

So in essence, 1, 2 and 3 should be possible right away and just a matter of clicks! With the 4, you'll have to setup a Scheduled Action as opposed to 1/2/3. That will only be the difference.

On the whole I feel this is all possible and this might be the best time to venture into Processes -