• JayOlay
  • NEWBIE
  • 35 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 10
    Replies
For both the flows I have created, when I get to the end of the flow, and am returned to my retURL, the format of the page changes- like a completely different set of CSS:

Before the Flow:

Before Flow

After the Flow:
After Flow

The only thing I can imagine to be the problem is that I have added an "&isdtp=mn" to my button URL- I did this so that when I was returned to my Opportunity, I wouldn't have a double header and sidebar.  Perhaps I need a different parameter value to serve that purpose?  I have not found a good resource for these kinds of parameters online. 
triger on account which matches email and phone of the associated account, if both match then only insert contact record else throww error
trigger MatchPhoneonAccount on Contact (before insert)
{
    set<id> accIdset = new set<id>();
    for(Contact c :trigger.new)
    {
        if( c.accountid!=null)
            {
             accIdset.add(c.AccountId);
            }
    }
     map<id,account> accMap = new map<id,account>([Select id,Email__c , Phone from account where id in : accIdset]);
     
     
    for(contact c : trigger.new)
    {
         if(c.Email != null && c.Phone != null && accMap != null)
         {
          system.debug('*******Email'+c.Email);
          system.debug('*******Phone'+c.Phone);
            if(c.Email != accMap.get(c.accountid).Email__c &&  c.Phone != accMap.get(c.accountid).Phone)
            {
            system.debug('*******Dosent Matched'+c.Phone);
             c.adderror('Your phone and Email does not exists in out database .');
            }
         }
    
    }
}

no debug logs are generate and even though account and contact email, phone are different , the trigger dosent fire .
I'm new to flow in Salesforce. I'm trying to update   "Type" picklist value in task object based on other picklist value field(product) .    
Product picklist has value for example A,B & C . Product picklist cannot be edited and is set by other process.
If product field is set to A  during task creation , I want to set the "Type" picklist value to "Email"
If product field is set to B  during task creation , I want to set the "Type" picklist value to "Call"

I created a flow with 2 "record updates" to update "Type" field based on product. The first record update will fire if product value is A and second record update will fire if product value is B. I created a workflow and added flow trigger in the workflow action. This workflow is set to fire only when record is created.

I have not tested it. Is this the right approach and correct  way to create flow?  also, will only the record that was created will be updated by flow or ALL task records will be updated. I wanted to be sure before i activate it.   Thanks for help.
User-added image

 
  • January 12, 2015
  • Like
  • 0
I've got a visualforce page exposed through SF1 that works wonderfully when I access it through the /one/one.app sf1 application, but on the native android app it always pops up a login page. I'm logged into a sandbox but the login page that pops up is targeted at http://login.salesforce.com so I can't log in and since it's not the standard sf1 login point I can't switch the server so there doesn't seem to be anyway to make the page show up in the app. It seems to me that if the page works at /one/one.app it should work in the native apps as well, any thoughts? 
For both the flows I have created, when I get to the end of the flow, and am returned to my retURL, the format of the page changes- like a completely different set of CSS:

Before the Flow:

Before Flow

After the Flow:
After Flow

The only thing I can imagine to be the problem is that I have added an "&isdtp=mn" to my button URL- I did this so that when I was returned to my Opportunity, I wouldn't have a double header and sidebar.  Perhaps I need a different parameter value to serve that purpose?  I have not found a good resource for these kinds of parameters online. 
Hi all, 

How do I deploy a apex class from sandbox to production so I can use it in a visual force email? 

Thanks,
I am looking to get some help with object tables and email templates. I am trying to create an email template that pulls information from two object tables. There are two object tables, the second object table has a relationship with the first object table. 

Example:

Object Table #1 - consist the following information
  • Manufactures company info
    • Name,address,phone#, contact information
Object Table #2 - Consist the following information which is related to Ojected Table #1
  • Employee Information of that manufacturing company
    • Employee name and ID #
Even though object table #2 has build a relationship with object table #1. So when a user looks up manufactures, on the same page they are able to view the employee information. When I create the email template, I can specify and pull all the information from Object table 1, which I would like to display in the email. However in the email where I specify field names from Object table #2, they remain blank when I run the test email. Mainly because the email template can only pull one object at a time it seems in salesforce. 

Im not sure what the best solution to resolve this issue. 
  1. Do I need to create a field in object table #1 to display, names from Object table #2 (and hide the field from view since, since object table 2 is displayed inside of object table 1 page?

I am not an developer, so please bare with me. 

Thank for your help in advance! 
  • January 09, 2015
  • Like
  • 0
Hello!
I'm starting reading documentation and I want use the JSforce (a JavaScript library).
I'm using the trial for Enterprice Edition
For using the API I read that I have to create a new Connected App with OAuth enable and I have the security token.

When I trying to make a simple query, the system answers with this error:
{ [API_DISABLED_FOR_ORG: The REST API is not enabled for this Organization.]
  name: 'API_DISABLED_FOR_ORG',
  errorCode: 'API_DISABLED_FOR_ORG' }

How can be possible? API are not enabled in trial version?
I have a VF page where I'm looking to display related content on it. From the documentation I found (https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_contentdocumentlink.htm), you need to query the ContentDocumentLink object. Here's what my code looks like:

String eyeDee = Apexpages.currentPage().getParameters().get('Id');
thisCase = [SELECT Id, IsClosed, Subject FROM Case WHERE Id =: eyeDee LIMIT 1];
for(ContentDocumentLink c: [SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId =: thisCase.Id])
            kIds.add(c.ContentDocumentId);
content = [SELECT Id, Title, Description, Owner.Name, CreatedDate FROM ContentVersion WHERE PublishStatus = 'P' AND IsLatest = true AND ContentDocumentId IN: kIds ORDER By CreatedDate];

When I load the page however, I don't get any results. 

On the standard page (https://www.dropbox.com/s/fov495yzhyelami/Screenshot%202015-01-19%2012.46.15.png?dl=0) I can see the content. On the VF page, I don't get anything.

VF Code:
<apex:pageBlock title="Related Content">
   <apex:pageBlockTable value="{!Content}" var="c" rendered="{!Content.size != 0}">
      <apex:column >
          <apex:facet name="header">
               Title
          </apex:facet>
          <apex:outputLink value="/customers/{!c.Id}" target="_blank">{!c.Title}</apex:outputLink>
      </apex:column>
      <apex:column value="{!c.Description}"/>
      <apex:column value="{!c.Owner.Name}"/>
      <apex:column value="{!c.CreatedDate}"/>
   </apex:pageBlockTable>
   <apex:outputText value="No Content Related" rendered="{!Content.size == 0}"/>
</apex:pageBlock>

Any help would be awesome.
I've been reading the other posts, but due to my lack of coding experience (button admin just learning code) I'm having difficulting translating solutions for standard VF pages to my Flow VF page where I have no code for the buttons.

I have a flow which is launched in a new window through a custom link on a custom object. I want the window to close and refresh the custom object page when the flow is completed. I have two VF Pages - The first with the flow, and the second which I am using as a finish location which holds my Javascript currently. I have been able to get the new window to close using the code below, but I have been unsuccessful in getting any code to refresh the custom object/parent window. Any help/recommendations would be appreciated!

Custom Link
/apex/New_PP_with_Listing_Decision_Tree?pba_property_id={!pba__Listing__c.pba__PropertyId__c}

Flow VF Page - New_PP_with_Listing_Decision_Tree
<apex:page showHeader="False" sidebar="False">
  <flow:interview name="New_PP_with_Listing_Decision_Tree" finishLocation="{!$Page.Close}" >
  </flow:interview>
</apex:page>

Javascript VF Page - Close
<apex:page >
    <script type="text/javascript">
        window.close();
    </script>
</apex:page>
  • January 03, 2014
  • Like
  • 1