• John Towers
  • NEWBIE
  • 225 Points
  • Member since 2014
  • Programmer Analyst
  • Western & Southern Financial Group


  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 37
    Replies
Can Streaming API be used to get data from external API into SFDC rather than send from SFDC ???
So basically Salesforce acts as a client rather than server..
Here is the code on the custom "New" button:
https://vitl.my.salesforce.com/02i/e?retURL=%00bd0000000j1wB&acc_id={!Account.Id}&Name="Do Not Edit - will auto populate"

Here is the error message the user receives if they then select the "Cancel" button:

URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com. 

You may have reached this page after clicking on a direct link into the application. This direct link might be: 
• A bookmark to a particular page, such as a report or view 
• A link to a particular page in the Custom Links section of your Home Tab, or a Custom Link 
• A link to a particular page in your email templates 

If you reached this page through a bookmark, you are probably trying to access something that has moved. Please update your bookmark. 

If you reached this page through any of the other direct links listed above, please notify your administrator to update the link. 

If you reached this page through a link on our site, please report the broken link directly to our Support Team and we will fix it promptly. Please indicate the page you were on when you clicked the link as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com!
No pricebook is accessible to user but the user can still all the products.

How is it possible to remove theaccess to products ?
  • March 09, 2017
  • Like
  • 0
 AggregateResult[] groupedResults
            = [SELECT Detail_Question__r.PSQ_Applications__c, count(Id)
               FROM PSQ_Detail__c
               WHERE Detail_Question__r.App_dependency__c = Answer__c 
               AND PSQ_Header__c = :stdCtrl.getId()
               GROUP BY Detail_Question__r.PSQ_Applications__c];

I am getting an error on the where clause: expecting a colon, found 'Answer__c'

Any help would be appreciated.  Thanks in advance!
Dear all,

could you please advise me what could be wrong, while I am receiving the dozens of emails of the following error:

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Address_for_Contact_created_from_Account
Type: Workflow
Version: 4
Status: Active
Flow Interview Details
Interview Label: Address_for_Contact_created_from_Account-4_Contact
Current User: John Doe (00123Y00000JK59)
Start time: 07/03/2017 12:11
Duration: 0 seconds
How the Interview Started
Chris Moore (0050Y000000JK59) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = 0030Y00000EBRcIQAX
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "07/03/2017 12:11"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.MailingCity} (Halls) Is null false
2. {!myVariable_current.MailingCountry} (Germany) Is null false
3. {!myVariable_current.MailingStreet} (ABC) Is null false
4. {!myVariable_current.MailingPostalCode} (2820) Is null false
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Contact records where:
Id Equals {!myVariable_current.Id} (0030Y00000EBRcIQAX)
Update the records’ field values.
MailingCity = {!myVariable_current.Account.BillingCity} (<interaction.engine.info.GenericInterviewValueKey@6ac791ba couldn't be resolved>)
MailingCountry = {!myVariable_current.Account.BillingCountry} (<interaction.engine.info.GenericInterviewValueKey@64810c9e couldn't be resolved>)
MailingPostalCode = {!myVariable_current.Account.BillingPostalCode} (<interaction.engine.info.GenericInterviewValueKey@6574605a couldn't be resolved>)
MailingStreet = {!myVariable_current.Account.BillingStreet} (<interaction.engine.info.GenericInterviewValueKey@1307827d couldn't be resolved>)
Result
Failed to update records that meet the filter criteria.

The corresponding process builder is the following:
User-added image

The idea of this process suppose to be: when the user creates a new contact from the account the account address is picked up automatically the same that the account has; if other address is typed for the contact - that one is kept and account address is not taked.
Any help appreciated.

Thank you
  • March 07, 2017
  • Like
  • 0
Hi All,

I'm putting together an invocable Apex method that gets called when an order is Activated.
The method loops around the products in the order (OrderItems) and create X number of Assets based on the quantity value of the order line.
This means I end up with a loop inside a loop. I'm not hitting limits yet, but am concerned that I could once we move the code to production.

Here's the offending code:
for(OrderItem prod : [select OrderItem.Product2.name, CurrencyIsoCode, id, Product2Id, Quantity, UnitPrice, OrderItem.Order.AccountId, OrderId from OrderItem where OrderId in : oids and OrderItem.Pricebookentry.product2.Is_Asset__c = true]){
            for (integer i = 0; i < prod.Quantity; i++) {
                Asset a = new Asset();
                a.name = prod.Product2.name;
                a.AccountId = prod.Order.AccountId;
                a.Price = prod.UnitPrice;
                a.Product2Id = prod.Product2Id;
                a.Quantity = 1;
                a.CurrencyIsoCode = prod.CurrencyIsoCode;
                a.Status = 'Purchased';
                a.Order_Product__c = prod.id;                

            	newAssets.add(a);
            }
        }

insert newAssets;



 
Hi,
I am new to Lightning please help me with this. I am getting the following error:
Uncaught Action failed: c:LinkToAttachment$controller$preview [action.SetCallback is not a function]
when I try to run my lightning component on button click. Please Help
Here is my Code:
LinkToAttachment.cmp
<aura:component controller = "LinkToAttachment" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
   <aura:attribute name="contentId" type="String" default="0691h0000001LU8AAM"/>
<lightning:button variant="brand" label="Quick Reference Guide" onclick="{!c.preview }" />
</aura:component>
LinkToAttachmentController.js
({
   preview : function(component, event, helper) {
       var action = cmp.get("c.openfile1");
       action.SetCallback(this, function(response){
       var state = response.getState();
           if(state == "SUCCESS"){
               alert("From server: " + response.getReturnValue());
       var Cdid = response.getReturnValue();
       cmp.set("v.contentId", Cdid);
       $A.get('e.lightning:openFiles').fire({
        recordIds: ["v.contentId"]
    });
           }
});
       $A.enqueueAction(action);
   }
})

LinkToAttachment.apxc
public with sharing class LinkToAttachment {
    
    @AuraEnabled
    Public static List<ContentDocument> openfile1(){
        List<ContentDocument> Cdid=[SELECT id FROM ContentDocument 
                             where Title=' Test Document'];
        return Cdid;
    } 

}

Thanks
 
Can Streaming API be used to get data from external API into SFDC rather than send from SFDC ???
So basically Salesforce acts as a client rather than server..
Here is the code on the custom "New" button:
https://vitl.my.salesforce.com/02i/e?retURL=%00bd0000000j1wB&acc_id={!Account.Id}&Name="Do Not Edit - will auto populate"

Here is the error message the user receives if they then select the "Cancel" button:

URL No Longer Exists
You have attempted to reach a URL that no longer exists on salesforce.com. 

You may have reached this page after clicking on a direct link into the application. This direct link might be: 
• A bookmark to a particular page, such as a report or view 
• A link to a particular page in the Custom Links section of your Home Tab, or a Custom Link 
• A link to a particular page in your email templates 

If you reached this page through a bookmark, you are probably trying to access something that has moved. Please update your bookmark. 

If you reached this page through any of the other direct links listed above, please notify your administrator to update the link. 

If you reached this page through a link on our site, please report the broken link directly to our Support Team and we will fix it promptly. Please indicate the page you were on when you clicked the link as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com!
Hello,

I am trying to create my first VF page that has a table, the first field of the first column is a child of Account (Account.name) . the second one (Invoice Date) is a child of that child. but for the second one I am getting this error. I tried different things but it is not working. the second part of my code is the other way that I tried but getting errors.

Would you please help me with that?

Here is my page:

<apex:page standardController="Account" readOnly="true" renderAs="pdf">
<div class="bPageBlock">
    <div class="pbBody" style="padding: 0; margin: 0; vertical-align: top; color: #000; display: block;">
        <table class="detailList" border="0.5" cellpadding="0" cellspacing="0" >
                <tbody>
                    <tr> 
                        <td class="labelCol">Account</td>
                        <td class="dataCol"  id="Acc_cell">
                            <div id="Acc_inner">
                                <apex:outputlink value="/{!Account.Name}">{!Account.Name}</apex:outputlink>
                            </div>
                        </td>
                        
                        <apex:variable var="inv" value="{!Account.CommercientSF8__SAGE300_Invoice_Headers__r}"/>
                        
                        <td class="labelCol">Invoice Date</td>
                        <td class="dataCol" >
                            <div id="inv_inner">
                              <apex:outputlink value="/{!inv.CommercientSF8__INVNUMBER__c}">{!inv.CommercientSF8__INVNUMBER__c </apex:outputlink>
                            </div>
                        </td>
                    </tr>
                </tbody>
         </table>
    </div>
</div>


<apex:pageBlock>
<apex:pageBlockSection title="SAGE300 Invoice Lines">
    <apex:pageBlockTable value="{!CommercientSF8__SAGE300_InvoiceHeader__c.CommercientSF8__SAGE300_Invoice_Lines__r}" var="inv2">
        <apex:outputField value="{!inv2.Name}"/>
        <apex:outputField value="{!inv2.CommercientSF8__DESC__c}"/>
        <apex:outputField value="{!inv2.CommercientSF8__PRIUNTPRC__c}"/>
        <apex:outputField value="{!inv2.CommercientSF8__QTYSHIPPED__c}"/>
    </apex:pageBlockTable>
 </apex:pageBlockSection>
</apex:pageBlock>
No pricebook is accessible to user but the user can still all the products.

How is it possible to remove theaccess to products ?
  • March 09, 2017
  • Like
  • 0
Hello,
 
As part of fulfillment process our manufacturing team works on Assets which are related to the standard Order object.  The manufacturing team needs to add either a Serial Number or a Voucher Code (text fields) to the related assets before they can complete their fulfillment.  This is an important step and is easily missed. 
 
What I would like to do is create a Ready For Fulfillment – picklist field on the Order which will query on all related assets. 

1)  If any or all asset do NOT have either a Serial Number or a Voucher Code then I would like the Ready For Fulfillment field to be set to "Not Ready". 

2)  If all Assets have at least one Serial Number or a Voucher Code then I would like the Ready For Fulfillment field to be set to "Ready".
 
Can I do this using a Flow, Process Builder or Trigger?
 
Thanks,

Aaron
Hello,

I am attempting to extract information from a salesforce object using the data loader command line functionality.  I currently have a process-conf and .sdl that execute properly.  However, when I attempt to include Format() in the select statement, I am unsure of how to modify the mapping in the .sdl to bring it into the .csv.  I've tried a couple things that were unsuccessful.

This example works fine:
Select Id, CreatedDate
From Account

This example does not:
Select Id, format(CreatedDate)
From Account
Hi ,

I write a apex class on task object which will insert a record.

Public class InsertTaskForDEMO {
 
 public static void newtask()
{ List<Task> ACCD  = new List<Task>();

for (Integer i=0; i<3; i++)
 {
 Task Act = new Task(Status='Not Started',Subject='Other');
   ACCD.add(Act);
   insert ACCD;
}}}

i want to call this newtask method in trigger made on custom object 

trigger checkpromotiondetails on Task (after insert)
{
for (Demo__c Task :trigger.new)
{ if (Demo__c.Eligible_for_Bouns__c = 'True')
{
InsertTaskForDEMO.newtask();
}
}}

while trying to same it is givning me error.

 
I've scoured the forums. Is it possible to leverage the Schedulable Inteface to schedule a REST Post callout every 30 minutes? I found a related article saying this was not supported, but its from 2010: https://developer.salesforce.com/forums/?id=906F0000000BLRzIAO#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F00000008xKiIAI
Dear all,

could you please advise me what could be wrong, while I am receiving the dozens of emails of the following error:

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Address_for_Contact_created_from_Account
Type: Workflow
Version: 4
Status: Active
Flow Interview Details
Interview Label: Address_for_Contact_created_from_Account-4_Contact
Current User: John Doe (00123Y00000JK59)
Start time: 07/03/2017 12:11
Duration: 0 seconds
How the Interview Started
Chris Moore (0050Y000000JK59) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = 0030Y00000EBRcIQAX
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "07/03/2017 12:11"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.MailingCity} (Halls) Is null false
2. {!myVariable_current.MailingCountry} (Germany) Is null false
3. {!myVariable_current.MailingStreet} (ABC) Is null false
4. {!myVariable_current.MailingPostalCode} (2820) Is null false
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_1_A1
Find all Contact records where:
Id Equals {!myVariable_current.Id} (0030Y00000EBRcIQAX)
Update the records’ field values.
MailingCity = {!myVariable_current.Account.BillingCity} (<interaction.engine.info.GenericInterviewValueKey@6ac791ba couldn't be resolved>)
MailingCountry = {!myVariable_current.Account.BillingCountry} (<interaction.engine.info.GenericInterviewValueKey@64810c9e couldn't be resolved>)
MailingPostalCode = {!myVariable_current.Account.BillingPostalCode} (<interaction.engine.info.GenericInterviewValueKey@6574605a couldn't be resolved>)
MailingStreet = {!myVariable_current.Account.BillingStreet} (<interaction.engine.info.GenericInterviewValueKey@1307827d couldn't be resolved>)
Result
Failed to update records that meet the filter criteria.

The corresponding process builder is the following:
User-added image

The idea of this process suppose to be: when the user creates a new contact from the account the account address is picked up automatically the same that the account has; if other address is typed for the contact - that one is kept and account address is not taked.
Any help appreciated.

Thank you
  • March 07, 2017
  • Like
  • 0
I am consuming a third party Rest Service. One of data fields is return following -1.E-02. When I pass the json data through the json  deserializer. I am hit with the following error: System.JSONException: Unexpected character ('E' (code 69)) in numeric value: Decimal point not followed by a digit at [line:1, column:1509]
 
Hello,

I am attempting to extract information from a salesforce object using the data loader command line functionality.  I currently have a process-conf and .sdl that execute properly.  However, when I attempt to include Format() in the select statement, I am unsure of how to modify the mapping in the .sdl to bring it into the .csv.  I've tried a couple things that were unsuccessful.

This example works fine:
Select Id, CreatedDate
From Account

This example does not:
Select Id, format(CreatedDate)
From Account