• JonWu
  • NEWBIE
  • 20 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
Hi!

I have an unpackaged source that I want to retrieve (package.xml is below) using sfdx. The retrieve command succeeds without errors, but out of the 35 or so custom objects, only 3 get retrieved -- these are the ones that don't have __c suffix. 

I'm using the following command on a Mac OS Sierra 10.12.6:
sfdx force:mdapi:retrieve --verbose -r ./mdapipkg -u <scratch-org-name> -k ./package.xml 

Any help will be appreciated. 

Thanks,

The package.xml is as follows: 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>Account</members>
        <members>AnalyticsEvent__c</members>
        <members>Product2</members>
        <members>AddressAttribute__c</members>
        <members>Address__c</members>
        <members>Category__c</members>
        <members>Contact</members>
        <members>CustomerPromotion__c</members>
        <members>CustomerSpecialInstruction__c</members>
        <members>Discount__c</members>
        <members>GoogleCloud__c</members>
        <members>Negative__c</members>
        <members>OrderAdjustment__c</members>
        <members>OrderItem__c</members>
        <members>OrderSpecialInstruction__c</members>
        <members>Order__c</members>
        <members>PersonAccount</members>
        <members>Project__c</members>
        <members>Promotion__c</members>
        <members>ProofFormat__c</members>
        <members>ProofPhoto__c</members>
        <members>ProofReviewer__c</members>
        <members>ProofRevisionHistory__c</members>
        <members>ProofRevisionSurfaceOverlay__c</members>
        <members>ProofRevisionSurface__c</members>
        <members>ProofRevision__c</members>
        <members>ProofSpecialInstruction__c</members>
        <members>ProofSurface__c</members>
        <members>Proof__c</members>
        <members>Response__c</members>
        <members>SampleRequest__c</members>
        <members>ShipmentOrderItem__c</members>
        <members>Shipment__c</members>
        <members>StringAttribute__c</members>
        <members>UploadedPhoto__c</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>SystemMessages/LargeDiscountAlert</members>
        <members>SystemMessages/MissingProofAlert</members>
        <members>SystemMessages/ShipmentShippingDelayAlert</members>
        <members>SystemMessages/CustomerOrderAdjustmentNotification</members>
        <members>SystemMessages/CustomerShippingNotification</members>
        <members>SystemMessages/EditRequestsDelayedNotification</members>
        <members>SystemMessages/EditsComplete_ToCustomer</members>
        <members>SystemMessages/NegativeTotalAlert</members>
        <members>SystemMessages/ProofLockExpired</members>
        <members>SystemMessages/ProofReassignedAlert</members>
        <members>SystemMessages/ReminderToApproveProof</members>
        <members>SystemMessages/ReminderToApproveProof2nd</members>
        <members>SystemMessages/ReminderToApproveProofFinal</members>
        <members>SystemMessages/ShipmentGenerationFailed</members>
        <members>SystemMessages/ShipmentPrintingCallbackFailed</members>
        <name>EmailTemplate</name>
    </types>
    <types>
        <members>*</members>
        <name>Layout</name>
    </types>
    <types>
        <members>*</members>
        <name>StaticResource</name>
    </types>
    <version>38.0</version>
</Package>



 
  • October 05, 2017
  • Like
  • 0
For years I've had code that uses the SOAP API through the Java SDK to insert and update records. I also have some Apex triggers that run on the Salesforce side. However, this past weekend, I many REQUEST_RUNNING_TOO_LONG errors - mostly in 2 distinct time intervals (see screenshot below).

Error time windows (Pacific Time)

We're on NA10 but I see nothing posted in trust about issues this past weekend. However, it seems like slowness or an issue on the Salesforce end is the most likely cause here given that we haven't changed anything in months.

In addition, I've seem this 10's of other times (usually in bursts again) since the Winter '16 update but we've never gotten this error before. How can we get back to being reliable and has anybody else had this issue?
  • November 02, 2015
  • Like
  • 0

I'm just getting started with flow, but I'm very experienced with Apex and VisualForce so many concepts are familiar to me. However, I'm having trouble understanding how cross-object field references (https://help.salesforce.com/HTViewHelpDoc?id=vpm_designer_crossobject_reference.htm&language=en_US) are supposed to work.

Problem
How do I use cross-object references in screens or conditions?

If I use a cross object reference in a screen such as {!order.Customer__r.Name}, I don't see anything. If I try and query a field like Customer__r.Name in a Fast Lookup, validation fails and the name gets erased. Likewise, if I try to use something like {!order.Customer__r.Name} in a decision, validation fails and that reference is erased.

Scenario
I have a custom object called Order__c with a lookup called Customer__c which points to an Account. In other words, Order__r.Customer__c is an Account Id.

What's the easiest way to display a screen with the order name and the customer's name?

What I tried
1. Create a Fast Lookup to get the Order__c that assigns to a variable called order and fetches the order's Name. If I try to add Customer__r.Name to fields, the value doesn't validate and gets erased. Therefore, I just query Customer__c (an account Id) as the help article seems to imply I need to do.
2. I create a screen and try to reference {!order.Customer__r.Name} and I see nothing. The article seems to imply that Salesforce might magically query the needed but missing info, but that doesn't seem to work.

Of course, I can do another fast lookup to query an Account query Account.Id = order.Customer__c and assign that to a variable named customer, the access {!customer.Name}. However, I'm trying to figure out how cross-object references work in flow to hopefully simplify things.

Questions
1. What am I doing wrong?
2. Should cross-object references result in some data being queried automatically? How is the cross-object data supposed to come in?
3. Can you use cross-object references with related children / lists in addition to lookups?

I fully understand how to add additional fast lookups to my flows to get the necessary data and I'm try just trying to see if there's some cross-object reference magic that can take a few explicit steps out.

Thanks!

  • April 24, 2015
  • Like
  • 0

I've run across what seems to be a bug. I've contact support but they closed my case. Hopefully I can get that re-opened, but until then maybe somebody here can help file an official bug and I hope this can help somebody else. I've been tearing my hair out over this!

 

This has happened on a few objects so it's not object specific. However in this example I have an object called CustomerSpecialInstruction which has a Master-Detail field to account.

 

BUG OVERVIEW

 

When using <apex:inlineEditSupport/> within a pageBlockTable which outputs columns and headers automatically using <apex:column value="{!someField}"/> just like the example in the pageBlockTable documentation, only the last row of the table updates when the page is saved. The inline editing quick start documentation also lists taht the inlineEditSupport tage can be a descendant of pageBlockTable so according to the documentation this should work.

 

These screenshots show the issue:

 

BEFORE SAVING

 

Here, I've edited all 3 rows. When clicking save you'd expect that all 3 rows are updated to the values you see here.

To reproduce, try saving multiple rows of data in an inline editable pageBlockTable which doesn't use apex:outputField

 

AFTER SAVING

 

You see that updates are only applied to the last row for the column that didn't use an outputField to display the value (Archived). The Name column was updated for all records because the value was outputted using outputField instead of apex:column. To see where I made this workaround, see where I have a comment saying DEBUG TESTING in my VisualForce code below.

 

Perhaps there's some internal ID conflict with the auto generated code that makes inline editing work.

 

Saving does not work\

 

DETAILS / CODE

 

I've made an extension to Account to create a getter to query any CustomerSpecialInstruction__c objects where Account__c == Account.Id as follows:

 

global without sharing class CustomerSpecialInstructionsDebug {
	
	private Account customer;
	private CustomerSpecialInstruction__c[] customerSpecialInstructions; 
	
	public CustomerSpecialInstructionsDebug(ApexPages.StandardController stdController) {
		this.customer = (Account) stdController.getRecord();
	}
	
	public PageReference saveAll() {
		update customerSpecialInstructions;
		return null;
	}
	
	public CustomerSpecialInstruction__c[] getCustomerSpecialInstructions() {
		if (customerSpecialInstructions == null) {
			customerSpecialInstructions = [ SELECT Name, Description__c, Archived__c
				FROM CustomerSpecialInstruction__c
				WHERE Account__c = :customer.Id ];
		}
		return customerSpecialInstructions;
	}
}

 

Then I have a page with a pageBlockTable with inlineEditing enabled:

 

<apex:page standardController="Account" extensions="CustomerSpecialInstructionsDebug" showHeader="false" sidebar="false">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!saveAll}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Customer Special Instructions" columns="1">
            	<apex:pageBlockTable value="{!customerSpecialInstructions}" var="instruction">
            		<apex:inlineEditSupport />
            		<apex:column width="40">
            			<apex:outputLink value="{!URLFOR($Action.CustomerSpecialInstruction__c.View, instruction)}">View</apex:outputLink>
            		</apex:column>
            		<apex:column value="{!instruction.Archived__c}"/>
            		<!-- DEBUG TESTING: Removed inline edit column and replaced with an inputField and everything works as expected! -->
            		<!-- <apex:column value="{!instruction.Name}"/> -->
            		<apex:column >
            			 <apex:outputField value="{!instruction.Name}"/>  
            		</apex:column>
            	</apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I should be able to use this format for every column but I've discovered that when I do so, only 1 record saves: <apex:column value="{!instruction.Archived__c}"/> 

 

While writing up this simplified test case, I realized that if I explcitly define outputField here with inline editing (see instruction.Name vs the commented out version above it), everything works fine!

 

How can I get this bug fixed? Am I doing something wrong?

 

Thanks!

  • October 16, 2012
  • Like
  • 0
For years I've had code that uses the SOAP API through the Java SDK to insert and update records. I also have some Apex triggers that run on the Salesforce side. However, this past weekend, I many REQUEST_RUNNING_TOO_LONG errors - mostly in 2 distinct time intervals (see screenshot below).

Error time windows (Pacific Time)

We're on NA10 but I see nothing posted in trust about issues this past weekend. However, it seems like slowness or an issue on the Salesforce end is the most likely cause here given that we haven't changed anything in months.

In addition, I've seem this 10's of other times (usually in bursts again) since the Winter '16 update but we've never gotten this error before. How can we get back to being reliable and has anybody else had this issue?
  • November 02, 2015
  • Like
  • 0

I'm just getting started with flow, but I'm very experienced with Apex and VisualForce so many concepts are familiar to me. However, I'm having trouble understanding how cross-object field references (https://help.salesforce.com/HTViewHelpDoc?id=vpm_designer_crossobject_reference.htm&language=en_US) are supposed to work.

Problem
How do I use cross-object references in screens or conditions?

If I use a cross object reference in a screen such as {!order.Customer__r.Name}, I don't see anything. If I try and query a field like Customer__r.Name in a Fast Lookup, validation fails and the name gets erased. Likewise, if I try to use something like {!order.Customer__r.Name} in a decision, validation fails and that reference is erased.

Scenario
I have a custom object called Order__c with a lookup called Customer__c which points to an Account. In other words, Order__r.Customer__c is an Account Id.

What's the easiest way to display a screen with the order name and the customer's name?

What I tried
1. Create a Fast Lookup to get the Order__c that assigns to a variable called order and fetches the order's Name. If I try to add Customer__r.Name to fields, the value doesn't validate and gets erased. Therefore, I just query Customer__c (an account Id) as the help article seems to imply I need to do.
2. I create a screen and try to reference {!order.Customer__r.Name} and I see nothing. The article seems to imply that Salesforce might magically query the needed but missing info, but that doesn't seem to work.

Of course, I can do another fast lookup to query an Account query Account.Id = order.Customer__c and assign that to a variable named customer, the access {!customer.Name}. However, I'm trying to figure out how cross-object references work in flow to hopefully simplify things.

Questions
1. What am I doing wrong?
2. Should cross-object references result in some data being queried automatically? How is the cross-object data supposed to come in?
3. Can you use cross-object references with related children / lists in addition to lookups?

I fully understand how to add additional fast lookups to my flows to get the necessary data and I'm try just trying to see if there's some cross-object reference magic that can take a few explicit steps out.

Thanks!

  • April 24, 2015
  • Like
  • 0

I've run across what seems to be a bug. I've contact support but they closed my case. Hopefully I can get that re-opened, but until then maybe somebody here can help file an official bug and I hope this can help somebody else. I've been tearing my hair out over this!

 

This has happened on a few objects so it's not object specific. However in this example I have an object called CustomerSpecialInstruction which has a Master-Detail field to account.

 

BUG OVERVIEW

 

When using <apex:inlineEditSupport/> within a pageBlockTable which outputs columns and headers automatically using <apex:column value="{!someField}"/> just like the example in the pageBlockTable documentation, only the last row of the table updates when the page is saved. The inline editing quick start documentation also lists taht the inlineEditSupport tage can be a descendant of pageBlockTable so according to the documentation this should work.

 

These screenshots show the issue:

 

BEFORE SAVING

 

Here, I've edited all 3 rows. When clicking save you'd expect that all 3 rows are updated to the values you see here.

To reproduce, try saving multiple rows of data in an inline editable pageBlockTable which doesn't use apex:outputField

 

AFTER SAVING

 

You see that updates are only applied to the last row for the column that didn't use an outputField to display the value (Archived). The Name column was updated for all records because the value was outputted using outputField instead of apex:column. To see where I made this workaround, see where I have a comment saying DEBUG TESTING in my VisualForce code below.

 

Perhaps there's some internal ID conflict with the auto generated code that makes inline editing work.

 

Saving does not work\

 

DETAILS / CODE

 

I've made an extension to Account to create a getter to query any CustomerSpecialInstruction__c objects where Account__c == Account.Id as follows:

 

global without sharing class CustomerSpecialInstructionsDebug {
	
	private Account customer;
	private CustomerSpecialInstruction__c[] customerSpecialInstructions; 
	
	public CustomerSpecialInstructionsDebug(ApexPages.StandardController stdController) {
		this.customer = (Account) stdController.getRecord();
	}
	
	public PageReference saveAll() {
		update customerSpecialInstructions;
		return null;
	}
	
	public CustomerSpecialInstruction__c[] getCustomerSpecialInstructions() {
		if (customerSpecialInstructions == null) {
			customerSpecialInstructions = [ SELECT Name, Description__c, Archived__c
				FROM CustomerSpecialInstruction__c
				WHERE Account__c = :customer.Id ];
		}
		return customerSpecialInstructions;
	}
}

 

Then I have a page with a pageBlockTable with inlineEditing enabled:

 

<apex:page standardController="Account" extensions="CustomerSpecialInstructionsDebug" showHeader="false" sidebar="false">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!saveAll}" value="Save"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Customer Special Instructions" columns="1">
            	<apex:pageBlockTable value="{!customerSpecialInstructions}" var="instruction">
            		<apex:inlineEditSupport />
            		<apex:column width="40">
            			<apex:outputLink value="{!URLFOR($Action.CustomerSpecialInstruction__c.View, instruction)}">View</apex:outputLink>
            		</apex:column>
            		<apex:column value="{!instruction.Archived__c}"/>
            		<!-- DEBUG TESTING: Removed inline edit column and replaced with an inputField and everything works as expected! -->
            		<!-- <apex:column value="{!instruction.Name}"/> -->
            		<apex:column >
            			 <apex:outputField value="{!instruction.Name}"/>  
            		</apex:column>
            	</apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I should be able to use this format for every column but I've discovered that when I do so, only 1 record saves: <apex:column value="{!instruction.Archived__c}"/> 

 

While writing up this simplified test case, I realized that if I explcitly define outputField here with inline editing (see instruction.Name vs the commented out version above it), everything works fine!

 

How can I get this bug fixed? Am I doing something wrong?

 

Thanks!

  • October 16, 2012
  • Like
  • 0

Is there any guide or code available on force.com & database.com integration ? we are dealing with high volumn of data. If there is any native intergration technique (as both of them share same platform) please let me know.

  • April 18, 2012
  • Like
  • 0

 

To expand on my question: if you have an existing salesforce.com/force.com implementation, under what circumstances would you have a need for database.com?

 

I've been reading a few posts regarding database.com, and the general consensus seems to be that the only time you would use database.com is if you wanted to develop an application in another language other than force.com.  If you have an existing saleforce/force.com instance, there is little need for database.com, you would just use your existing force.com database.

 

Consider this use case:

 

You want your end users to be able to associate records in salesforce.com with records that are in a homegrown system (on top of a SQL database, lets say).  You've determined the best way to do this is to replicate all of the records in a staging database that allows for easy association to salesforce records.

 

Is there an advantage to setting up a database.com instance to be the staging database, as opposed to just loading them into your existing salesforce instance?  I'm thinking along the lines of mitigating space/scalability/cost concerns considering that you may get into hundreds of thousands of records in the future.