• Jay Hartley
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
This is basically the same question as https://developer.salesforce.com/forums?id=906F0000000BMONIA4, which is two years old and un-answered. There is documentation on enabling two-factor authentication for APIs, but nothing I can find for developers on how to provide the verification token as part of an API call.
The closest I get to real documentation for SOAP case is https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_concepts_security.htm. It seems to suggest that the two-factor token can perhaps be used in place of the standard security token, so appended to the password. Is this the case?
We just made a significant... ok HUGE... jump in the SOAP API version we are using, so I'm not sure when exactly this changed, but in API 24, the page layout for Person Account shows the First Name and Last Name on diferent rows when in Edit mode. The latest API, v37, seems to compress them all onto a single row, which gives our custom UIs a major headache.

What really confuses me is that Salesforce's own Account edit page has a layout consistent with the old API version, not the new one.

We've been able to deal with the other changes in the structure of the page-layout describe itself, but this is fundamentally a difference in the layout and labelling of the fields, just due to an API change. What gives? Am I missing something?

Old API: (Note two rows, two columns to show Salutation+FirstName, Credentials, LastName, and Specialty)
<editLayoutSections>
	<columns>2</columns>
	<heading>Account Information</heading>
	<layoutRows>
		<layoutItems>
			<editable>true</editable>
			<label>First Name</label>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>21</tabOrder>
				<type>Field</type>
				<value>Salutation</value>
			</layoutComponents>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>22</tabOrder>
				<type>Field</type>
				<value>FirstName</value>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>false</required>
		</layoutItems>
		<layoutItems>
			<editable>true</editable>
			<label>Credentials</label>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>31</tabOrder>
				<type>Field</type>
				<value>Credentials_vod__c</value>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>false</required>
		</layoutItems>
		<numItems>2</numItems>
	</layoutRows>
	<layoutRows>
		<layoutItems>
			<editable>true</editable>
			<label>Last Name</label>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>23</tabOrder>
				<type>Field</type>
				<value>LastName</value>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>true</required>
		</layoutItems>
		<layoutItems>
			<editable>true</editable>
			<label>Specialty</label>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>32</tabOrder>
				<type>Field</type>
				<value>Specialty_1_vod__c</value>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>false</required>
		</layoutItems>
		<numItems>2</numItems>
	</layoutRows>
	<layoutRows>
   <!-- snipped rest ... -->
</editLayoutSections>
API 37: (one row, two columns to show Salutation+FirstName+LastName and Credential. This is the same user and org as above result!)
<editLayoutSections>
	<columns>2</columns>
	<heading>Account Information</heading>
	<layoutRows>
		<layoutItems>
			<editableForNew>true</editableForNew>
			<editableForUpdate>true</editableForUpdate>
			<label>Name</label>
			<layoutComponents xsi:type="FieldLayoutComponent">
				<displayLines>1</displayLines>
				<tabOrder>20</tabOrder>
				<type>Field</type>
				<value>Name</value>
				<components>
					<displayLines>1</displayLines>
					<tabOrder>21</tabOrder>
					<type>Field</type>
					<value>Salutation</value>
				</components>
				<components>
					<displayLines>1</displayLines>
					<tabOrder>22</tabOrder>
					<type>Field</type>
					<value>FirstName</value>
				</components>
				<components>
					<displayLines>1</displayLines>
					<tabOrder>23</tabOrder>
					<type>Field</type>
					<value>LastName</value>
				</components>
				<fieldType>string</fieldType>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>true</required>
		</layoutItems>
		<layoutItems>
			<editableForNew>true</editableForNew>
			<editableForUpdate>true</editableForUpdate>
			<label>Credentials</label>
			<layoutComponents>
				<displayLines>1</displayLines>
				<tabOrder>31</tabOrder>
				<type>Field</type>
				<value>Credentials_vod__c</value>
			</layoutComponents>
			<placeholder>false</placeholder>
			<required>false</required>
		</layoutItems>
		<numItems>2</numItems>
	</layoutRows>
      <!-- snip ... -->
</editLayoutSections>

 
This is basically the same question as https://developer.salesforce.com/forums?id=906F0000000BMONIA4, which is two years old and un-answered. There is documentation on enabling two-factor authentication for APIs, but nothing I can find for developers on how to provide the verification token as part of an API call.
The closest I get to real documentation for SOAP case is https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_concepts_security.htm. It seems to suggest that the two-factor token can perhaps be used in place of the standard security token, so appended to the password. Is this the case?
Hi,

I am having issues with the rendering of images in a Visualforce PDF.

ll my product images are stored on a server and are accessible at the URL http://images.metropuzzle.com/IMG2/[PRODUCT CODE]_IMG2_L.jpg
E.g. http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg
When I try to use those URL in <apex:image> it does not render the image in the PDF...

User-added image


As I am trying to track down the issue, I found something very odd.
For this simple test I am using one of my product image, and an image I found online, the URL is http://investor.salesforce.com/files/design/newlogo-company.png -- This URL seems to redirect to the URL http://s1.q4cdn.com/454432842/files/design/newlogo-company.png

I am building the PDF with the Visualforce code below: 
<apex:page renderAs="PDF">
    <div class="productGridContainer">
            <div class="productGridItem">
                <div>
                    <apex:image value="http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg"/>
                    <apex:image value="http://investor.salesforce.com/files/design/newlogo-company.png"/>
                    <apex:image value="http://s1.q4cdn.com/454432842/files/design/newlogo-company.png"/> 
                </div>
            </div>
    </div>
</apex:page>

It does not render my product image, and for the image I found online it only renders the first one, not the second one. But it is the same image!
User-added image

Would someone have any idea why this is not working?

Thanks a lot!
How does 2 factor work for API access in salesforce? If enabled, how will API generate new tokens every time it expires, unlike humans who can look at authenticator app and add it to password. Documentation (https://help.salesforce.com/HTViewHelpDoc?id=security_require_2fa_api.htm&language=en_US) is not clear.

Also somewhere I read that in advanced user profile you can add a token in Time-Based Token field , but I dont see Add link in user profile , only remove link.  I was assuming that if we add the token in API user one time (from authenticator app_ ,we could use this in API calls.