• jimc507
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 2
    Replies

is there a way to get the description from the describe functions is Apex. I have looked at the Schema.DescribeSObjectResult and Schema.DescribeFieldResult objects and did not see them. Is there another method or am I overlooking something?

 

Thanks in advance

Jim

Hello,


After  SFDC does an upgrade on an org, we need the ability to lockout users from using SFDC until we have gone through our regression testing. Once the testing is done we need to remove the login restrictions and allow access to SFDC. Currently, to accomplish the task, we set the Login Hours for each profile to lockout the time we need to test. However, we currently have over 75 profiles, so this task becomes very tedious and time consuming. Is there a way to set the Login Hours via APEX or the SFDC API using the Data Loader? 

 

Thanks in advance,

Jim

Hello,

 

I have written a UrlRewriter class and implemented the generateUrlFor().

The basic URL is :

http://domain.com/Page?param1=param1Val&param2=param2Val&param3=param3Val.

 

The rewriter takes the URL and rewrites it to http://domain.com//param1Val/PageName/param2Val?param3=param3Val

On the page I am using:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val, 'param2' = param2Val, 'param3' = param3Val])}">{!$Label.Home_downloadDocuments}</apex:outputLink>

 

param1Val, param2Val, and param3val are all defined in the controller.

 

My tests run fine. I can see the output in the debug logs displaying the correct URL being sent to the new PageReference(url) and being returned. However, http://domain.com/Page?param1=param1Val&param2=param2Val&param3=param3Val is being displayed as the link on the page. 

 

If I only specify on parameter it works:

<apex:outputLink value="{!URLFOR($Page.CPDownloads, null, ['param1' = param1Val] )}">{!$Label.Home_downloadDocuments}</apex:outputLink>

 

http://domain.com/param1val/PageName

 

Has anyone seen this before or can tell me what I am missing?

 

Thanks in advance,

 

Jim

Hi, we are currently in the process of migrating user guides that are currently authored and published using MadCap. The documents are published to WebHelp (XHTML) and PDF formats. We are trying to import the web documents into Knowledge, and for the most part the documents import fine. We have a couple of issues though that I am hoping to get help on.

 

The documents have internal links, which are relative to other documents ,either to different pages or within the same page. Whenever a document is imported, the relative links are removed. Any fully qualified URL's are kept intact but the target referenced is changed to open the document in a new window.  

 

My idea is to write a pre-import tool that will call an apex class to display the article (i.e. /apex/KAViewer?UrlName=URLNameTitle

where URLName is the value stored in the URLName field of the Article Type. However, how can we specify a relative link in the documents. If the path has to be fully qualified, we would run into a maintenance issue with making sure we are using the correct SFDC domain. Also, is there a way to not have the target change. Opening a new browser for each link would be a usability issue.

 

Has anyone come across this issue with relative links in documents?

 

Thanks,

 

Jim

Hello,

 

I am receiving an error when trying to create a note via the web services API.

 

Here is the request. I believe I have set all of the required fields. The user logged into the API has full access to the Parent object. 

 

<create xmlns:tns="urn:partner.soap.sforce.com" xmlns="urn:partner.soap.sforce.com">

<tns:sObjects>

<ens:type xmlns:ens="urn:sobject.partner.soap.sforce.com">Note</ens:type>

<ens:ParentId xmlns:ens="urn:sobject.partner.soap.sforce.com">a0iS00000048mIp</ens:ParentId>

<ens:Title xmlns:ens="urn:sobject.partner.soap.sforce.com">Note From Ops: [4/20/2009 12:02:50 ...]</ens:Title>

<ens:Body xmlns:ens="urn:sobject.partner.soap.sforce.com">RMYERS 4/20/2009 12:02:50 PM:

This is a test note made at 12:02

</ens:Body>

</tns:sObjects>

</create>

 

Here is the response. Has anyone seen this or know what I am doing wrong?

 

<createResponse xmlns="urn:partner.soap.sforce.com">

<result>

<errors>

<fields xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

<message>

insufficient access rights on cross-reference id

</message>

<statusCode>

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

</statusCode>

</errors>

<id xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

<success>false</success>

</result>

</createResponse>

 

Thanks in advance.

 

Jim 

Hello,

 

I have a button on a Case page layout. In the JavaScript I am inserting a merge field {!Case.Id}. But when clicking the button I am receiving the error "Unexpected token ILLEGAL". If I try to merge any other field such as {!Case.CaseNumber} it works. Why is there a problem with the Id. I need to pass the Id to an APEX class. I removed all code exept this one line and it fails.

 

{!REQUIRESCRIPT ("/soap/ajax/15.0/connection.js")} 

{!REQUIRESCRIPT ("/soap/ajax/15.0/apex.js")}

 

var caseId = {!Case.Id} 

 

var caseId = {!CaseNumber} works, although with the number there is a diffrent problem. On the page the case number shows two leading zeros. 00408374. The case number displayed using an alert message is 408374. Therefore when the case number is passed to APEX it cannot find the record. I tried 

new String({!Case.CaseNumber} but that didn't work either. 

 

Can someone please help me figure out what is wrong. All I want to do is pass the Id of the Case record to the APEX class using sforce.apex.execute("MyClass","MyMethod",{id:caseId});

 

Thanks in advance.

 

Jim 

Hello,

I am using data loader to populate a large number of person account records. One of the fields in the csv file contains a newline character to display the data on two lines. The string is in quotes and uploads fine. However, when the field (Current Plan) is displayed on the Person Account page, the newline does not get converted to a
, nor is the newline in the html source.

How can I get the data to wrap on two lines? The origin of the data is being exported from an Oracle database.

Example:

This is how it displays now:
Current Plan: Monthly Plan Dec 2008 - Jun 2009

I need the data to be displayed as:
Current Plan: Monthly Plan
Dec 2008 - Jun 2009

Thanks in advance,

Jim
Hello,

I am trying to run a test upsert into a sandbox environment but am getting the following error. For now I am using SOAP UI to test.

Here is the SOAP request body:



Universal_ID__c


Account
100004446
005S0000000QOth
PersonAccount
Dpxonf
Itsauwxggb





4974
4974@test.com
Personal Trial
May 28, 2004 - Aug 05, 2004
Expired




At first I did not supply the record type and received:




true


record type missing for: Account
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY


false





After adding the RecordType - PersonAccount I received:




false


The external foreign key reference does not reference a valid entity: RecordType
INVALID_FIELD


false




What am I missing or need to do to get this to work.

Thanks in advance.

Hi, we are currently in the process of migrating user guides that are currently authored and published using MadCap. The documents are published to WebHelp (XHTML) and PDF formats. We are trying to import the web documents into Knowledge, and for the most part the documents import fine. We have a couple of issues though that I am hoping to get help on.

 

The documents have internal links, which are relative to other documents ,either to different pages or within the same page. Whenever a document is imported, the relative links are removed. Any fully qualified URL's are kept intact but the target referenced is changed to open the document in a new window.  

 

My idea is to write a pre-import tool that will call an apex class to display the article (i.e. /apex/KAViewer?UrlName=URLNameTitle

where URLName is the value stored in the URLName field of the Article Type. However, how can we specify a relative link in the documents. If the path has to be fully qualified, we would run into a maintenance issue with making sure we are using the correct SFDC domain. Also, is there a way to not have the target change. Opening a new browser for each link would be a usability issue.

 

Has anyone come across this issue with relative links in documents?

 

Thanks,

 

Jim

Hello,

I am trying to run a test upsert into a sandbox environment but am getting the following error. For now I am using SOAP UI to test.

Here is the SOAP request body:



Universal_ID__c


Account
100004446
005S0000000QOth
PersonAccount
Dpxonf
Itsauwxggb





4974
4974@test.com
Personal Trial
May 28, 2004 - Aug 05, 2004
Expired




At first I did not supply the record type and received:




true


record type missing for: Account
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY


false





After adding the RecordType - PersonAccount I received:




false


The external foreign key reference does not reference a valid entity: RecordType
INVALID_FIELD


false




What am I missing or need to do to get this to work.

Thanks in advance.