• jalexander
  • NEWBIE
  • 40 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 10
    Replies
I have a custom HTML form (on my website) that updates the Lat/Lon text fields on the Salesforce Account record.
  • It worked fine in Classic but now in Lightning it just opens up the record "without" my custom Lat/Lon" values populated?
Here is my URL that I'm passing in:
  • https://company.lightning.force.com/lightning/_classic/
    %2Fa1AU0000003y72TMAQ
    %2Fe%3Faccount
  • %3DJohn%2BBrown
  • %2600NU0000003rV68 (in Classic, this is the Lat field)
    %3D37.73533214243016
    %2600NU0000003rV6I (in Classic, this is the Lon field)
    %3D-88.53832679688946
    %26updateAccountLatLng
    %3DUpdate
    %2BSalesforce
    %2BLocation%253F
How do I make it work in Lightning?
  • I need it pass those two Lat (37.73533214243016) & Lon (-88.53832679688946) values into the Account Update page.
I have the following working code snippet but need to add a second condition to the WHERE clause..
/* Get the QuoteLineItem children of this Quote record 
        that meet the criteria defined in the WHERE clause */
        List<XX_ORD1__Quote_Line_Item__c> quoteLineItems = [
            SELECT Id, BSO_Template_V__c
            FROM XX_ORD1__Quote_Line_Item__c 
            WHERE XX_ORD1__Parent_QLI__c = null 
            AND XX_ORD1__Quote__c = :quoteId
        ];
Question#1: How do I add an extra AND clause:  XX_ORD1__QLI_Type__c  NOT LIKE 'Termination' (this is from a picklist)?
Question #2: How do I test the SOQL part in the sandbox before sending the Change Set to production (the Developer Console)?

 
I have the following javascript button on my Quote object that is giving me an "undefined" error when clicked:
User-added image

Here is the code:
{!REQUIRESCRIPT("/soap/ajax/35.0/connection.js")}

try{
var queryResult = sforce.connection.query(
"SELECT Id, XX_ORD1__Status__c, MSA_Agreement__c, CAA_Agreement__c, SYS_Account_Credit_Application__c, SYS_Site_Contact_check__c, SYS_IT_Contact_check__c" +
"FROM XX_ORD1__Quote__c" +
"WHERE Id = '{!XX_ORD1__Quote__c.Id}'"
);

var quote = queryResult.get("records");

if(quote.XX_ORD1__Status__c != 'Approved'){
alert("Approval Status has to be Approved before you can create the BSO.");
}

else if(quote.MSA_Agreement__c === null){
alert("No MSA found! You have to attach the MSA Agreement to the Quote before you can create the BSO.");
}

else if(quote.CAA_Agreement__c === null && quote.SYS_Account_Credit_Application__c !== 'No'){
alert("No CAA found! You have to attach the CAA Agreement to the Quote before you can create the BSO.");
}

else if(quote.SYS_Site_Contact_check__c === null){
alert("No Site Contact found! You have to have a Site Contact on the Location before you can create the BSO.");
}

else if(quote.SYS_IT_Contact_check__c === null){
alert("No IT Contact found! You have to have a IT Contact on the Location before you can create the BSO.");
}
else{
location.replace(
"/apex/echosign_dev1__AgreementTemplateProcess?masterid={!XX_ORD1__Quote__c.Id}"
);
}
}
catch(e){
alert("An Error has Occurred. Error:" + e.message);
}
Any ideas on what is causing this and how to tweak my code to fix?
 
I'm trying to create a VF page to launch a flow, but I can't get past this error after hitting the save button:
Error: <apex:component> is required and must be the outermost tag in the markup at line 1 column 1
Here is my VF page:
<apex:page standardController="Opportunity">
    <flow:interview name="New_Quote_Wizard" finishLocation="{!URLFOR('/a1m')}">
        <apex:param name="OppID2" value="{!Opportunity.Id}"/>
    </flow:interview>
</apex:page>

I'm following th example in the documentation, and this video: https://www.youtube.com/watch?v=FRdyCLJ-4l4 (timestamp: 28:11)
We have migrated to a new CPQ package in Salesforce, but have an old, unsupported trigger that is causing problems with creating new Opportunities. I deactivated the trigger in my Sandbox, pushed it out in a change set, but it fails in the Production Org because there is no test class?

I have no idea how to write the test class, and have no access to the old third-party support. 

Here is the trigger:
//This is provided as a sample to require a contact on opportunities it is provided without warranty and support. 

trigger opportunity_contact_required on Opportunity (before insert, before update) {
/*
    //map to keep track of the contact_required = 1
    Map<String, Opportunity> oppy_contact = new Map<String, Opportunity>();

    //Trigger.new is an array of opportunities 
    //and adds any that have Contact_Required = 1 to the oppy_contact Map
    for (Integer i = 0; i < Trigger.new.size(); i++) {
        System.debug('*****Required? ' + Trigger.new[i].contact_required__c);
        if  (Trigger.new[i].contact_required__c == 1) {
            oppy_contact.put(Trigger.new[i].id,Trigger.new[i]);
        }  
    }

    //map to keep track of the opportunity contact roles
    map<Id, OpportunityContactRole> oppycontactroles = new map<Id, OpportunityContactRole>();

    //select OpportunityContactRoles for the opportunities with contact role required 

    List<OpportunityContactRole> roles = [select OpportunityId, IsPrimary from OpportunityContactRole
        where (OpportunityContactRole.IsPrimary = True and OpportunityContactRole.OpportunityId
        in :oppy_contact.keySet())];


    for (OpportunityContactRole ocr : roles) {
        //puts the contact roles in the map with the Opportunity ID as the key
        oppycontactroles.put(ocr.OpportunityId,ocr);
    }

    // Loop through the opportunities and check if they exists in the contact roles map or contact role isn't required    
    for (Opportunity oppy : system.trigger.new) {
        //system.debug('List oppy Id - '+oppy.id);
        if  (oppy.contact_required__c ==1 && !oppycontactroles.containsKey(oppy.id))
        {
            oppy.addError('No Primary Contact Exists. Please go to the Contact Roles and select a primary contact.  Insure that all contacts related to this Opportunity are properly added in the Contact Roles with respective roles assigned.');       
        }
    } //for    */
 }

Here is the error: http://screencast.com/t/2V9hnkTH1 
User-added image

The Action Plans v3 workes great but in our scenario we need the following option:

- When a new Opportunity is created, the Stage always starts at "Prospecting"

- How do I "Trigger an Action Plan" based on that Sales Stage?

- Which would automatically load the Action Plan and it's preassigned tasks?

- Then when the stage changes to "Qualification", it triggers the next Action Plan automatically?

 

Currently we would have to "manually" assign the Action Plan based on the Stage, which runs the risk of not being assigned..

The Action Plans v3 workes great but in our scenario we need the following option:

- When a new Opportunity is created, the Stage always starts at "Prospecting"

- How do I "Trigger an Action Plan" based on that Sales Stage?

- Which would automatically load the Action Plan and it's preassigned tasks?

- Then when the stage changes to "Qualification", it triggers the next Action Plan automatically?

 

Currently we would have to "manually" assign the Action Plan based on the Stage, which runs the risk of not being assigned..

Hi everyone!

I have an issue and I cannot figure it out what's the problem.
I have created a flow for changing shipping method and updating delivery address. When I run the flow with my system administrator profile everything goes as expected. When I try to run with a supervisior profile I have an issue when it tries to update some fields on OrderDeliveryGroupSummary Object and I have this error: : INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: DeliverToCountry, DeliverToCity, DeliverToName, DeliverToState, DeliverToPostalCode, DeliverToStreet. Please check the security settings of this field and verify that it is read/write for your profile or permission set

The problem is that I checked the object permission for this profile and it has the same permission as a system administrator. I gave access for everything this flow needs. These fields are not visible in the object because they are address type I believe, they are visibile only in Workbench, so I can not give access directly to these fields, but it's the same for System administrator and it works. How to solve this issue? Please help

Thank you!
I remember years back, when I give "View All Data" or "Modify All data" system permission at the profile level, it will automatically give all FLS.  but when I check today, it seems only give object level permission, we still need to manually check all FLS for all objects. is there a easier way to grant all FLS to profile?
I have the following working code snippet but need to add a second condition to the WHERE clause..
/* Get the QuoteLineItem children of this Quote record 
        that meet the criteria defined in the WHERE clause */
        List<XX_ORD1__Quote_Line_Item__c> quoteLineItems = [
            SELECT Id, BSO_Template_V__c
            FROM XX_ORD1__Quote_Line_Item__c 
            WHERE XX_ORD1__Parent_QLI__c = null 
            AND XX_ORD1__Quote__c = :quoteId
        ];
Question#1: How do I add an extra AND clause:  XX_ORD1__QLI_Type__c  NOT LIKE 'Termination' (this is from a picklist)?
Question #2: How do I test the SOQL part in the sandbox before sending the Change Set to production (the Developer Console)?

 
I'm trying to create a VF page to launch a flow, but I can't get past this error after hitting the save button:
Error: <apex:component> is required and must be the outermost tag in the markup at line 1 column 1
Here is my VF page:
<apex:page standardController="Opportunity">
    <flow:interview name="New_Quote_Wizard" finishLocation="{!URLFOR('/a1m')}">
        <apex:param name="OppID2" value="{!Opportunity.Id}"/>
    </flow:interview>
</apex:page>

I'm following th example in the documentation, and this video: https://www.youtube.com/watch?v=FRdyCLJ-4l4 (timestamp: 28:11)
We have migrated to a new CPQ package in Salesforce, but have an old, unsupported trigger that is causing problems with creating new Opportunities. I deactivated the trigger in my Sandbox, pushed it out in a change set, but it fails in the Production Org because there is no test class?

I have no idea how to write the test class, and have no access to the old third-party support. 

Here is the trigger:
//This is provided as a sample to require a contact on opportunities it is provided without warranty and support. 

trigger opportunity_contact_required on Opportunity (before insert, before update) {
/*
    //map to keep track of the contact_required = 1
    Map<String, Opportunity> oppy_contact = new Map<String, Opportunity>();

    //Trigger.new is an array of opportunities 
    //and adds any that have Contact_Required = 1 to the oppy_contact Map
    for (Integer i = 0; i < Trigger.new.size(); i++) {
        System.debug('*****Required? ' + Trigger.new[i].contact_required__c);
        if  (Trigger.new[i].contact_required__c == 1) {
            oppy_contact.put(Trigger.new[i].id,Trigger.new[i]);
        }  
    }

    //map to keep track of the opportunity contact roles
    map<Id, OpportunityContactRole> oppycontactroles = new map<Id, OpportunityContactRole>();

    //select OpportunityContactRoles for the opportunities with contact role required 

    List<OpportunityContactRole> roles = [select OpportunityId, IsPrimary from OpportunityContactRole
        where (OpportunityContactRole.IsPrimary = True and OpportunityContactRole.OpportunityId
        in :oppy_contact.keySet())];


    for (OpportunityContactRole ocr : roles) {
        //puts the contact roles in the map with the Opportunity ID as the key
        oppycontactroles.put(ocr.OpportunityId,ocr);
    }

    // Loop through the opportunities and check if they exists in the contact roles map or contact role isn't required    
    for (Opportunity oppy : system.trigger.new) {
        //system.debug('List oppy Id - '+oppy.id);
        if  (oppy.contact_required__c ==1 && !oppycontactroles.containsKey(oppy.id))
        {
            oppy.addError('No Primary Contact Exists. Please go to the Contact Roles and select a primary contact.  Insure that all contacts related to this Opportunity are properly added in the Contact Roles with respective roles assigned.');       
        }
    } //for    */
 }

Here is the error: http://screencast.com/t/2V9hnkTH1 
User-added image
Hi Guys,

I am developing a Custom Hybrid Mobile Application like SIRI/GOOGLE NOW  for Salesforce. 

Users can open the Application. Ask questions like "what are the leads created today?/ Can you please show me the leads created today? etc etc etc ".

System can understand the question and it can respond with Salesforce leads created today.

Do you guys think this app will be useful for customers? based on the feedback , i am planning to complete this app and submit on appexchange.

Before i proceed with bigger implementation,Just want to check if any such app exist / will it be really useful?
 
Thanks,
Ravi Narayanan

I want to send a workflow email alert to the address in an email field on a record that is the parent of the record being processed.


There doesn't appear to be a way to do that.  I can reference parent fields all I want in the Formula that qualifies the Workflow.  But in the Email alert, when I select "Email Field", I only get Email fields in the actual record, not parent fields available.

 

The only work around I have found for this restriction is to write Apex code to copy the email field value of the parent into an email field on the child record.  That is really a pain.  It's never good to copy stuff around.  To keep in sync, both objects need update triggers that cascade update other records.

 

If a formula field could be of type email, I could define a formula field on the child that references the parent field.  But formula fields can't be type email.  (I added an Idea to allow that. feel free to vote up https://success.salesforce.com/ideaView?id=08730000000kwYAAAY.)

 

Without that feature I can't think of any way to do using definition features, only Apex.

 

Anyone have any ideas for another workaround for this issue?

 

Hi All,

 

I have an Approval process and everything works fine. When the user who is the approver access the email through iPad and click the link it opens up the detail page of the record in normal page. But when the user clicks Approve/ Reject button it takes them to the mobile version of the page.  How can I change this so it opens up the page just like how it will if I open it up in a desktop. 

 

Thanks.

 

Sanch.

  • August 06, 2012
  • Like
  • 0