• RagingForce
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 12
    Replies

Hi guys i am having problems when using google maps v3 and Geoxml3, i have a visualforce page that contains a map that renders kml files from a remote site, now the problem I have is that Geoxml3  will not allow this becasue of the following:

 

Geoxml3  is subject to the same cross-domain download restrictions as any JavaScript, so any KML document you expect it to process will need to be served from the same domain as the containing map page.

 

Are there any work arounds to this, or could anyone go into some detail how this could be accomplished? maybe proxy server not sure how this works or should be implemented?

how i am wondering if this can be done in apex say for example i am in BST (GMT+00:00) and want to convert a datetime to CET (GMT+01:00)

 

ok so if i am in london and it is 1pm and now i want to convert this to berlins time it should be 2pm

 

i am trying

 

DateTime ii = DateTime.now();

ii.format('h:mm a', 'GMT+01:00');

 

but this always returns 1pm?

Hi i have sites page that renders a google map but if i disable the header it does not work?

I keep getting this error when compiling my wsdl with wsc?

 

Java version:

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

 

[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 363 java files.
java.io.FileNotFoundException: C:\Program Files\Java\jre6\lib\tools.jar (The sys
tem cannot find the file specified)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at com.sforce.ws.tools.wsdlc$ToolsJarClassLoader.<init>(wsdlc.java:425)
        at com.sforce.ws.tools.wsdlc$Compiler.findCompilerInToolsJar(wsdlc.java:
346)
        at com.sforce.ws.tools.wsdlc$Compiler.<init>(wsdlc.java:334)
        at com.sforce.ws.tools.wsdlc.compileTypes(wsdlc.java:261)
        at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:88)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)
Error: Unable to find compiler. Make sure that tools.jar is in your classpath: j
ava.io.FileNotFoundException: C:\Program Files\Java\jre6\lib\tools.jar (The syst
em cannot find the file specified)

Hi i am making an application that will update the description/inline help text (Custom Field) from a CSV file.

 

Now i have done this in c# and got the basics worked out, the problem i am hitting is that when i convert the csv record into a Custom Field for update, i have to keep setting the type, which is of type enum FieldType and these values differ from describe fieldtypes and so creating a mapping table is out of the question.

 

Here is some code:

 

static void Main(string[] args)
{
SFDC_Enterprise.SforceService sv = new SFDC_Enterprise.SforceService();
SFDC_Enterprise.LoginResult lr = sv.login("aaaa", "aaaaaaaaaaaaa");

// set up a MetdataService client
SFDC_Metadata.MetadataService ms = new SFDC_Metadata.MetadataService();
ms.SessionHeaderValue = new SFDC_Metadata.SessionHeader();
ms.SessionHeaderValue.sessionId = lr.sessionId;
ms.Url = lr.metadataServerUrl;

Console.WriteLine("Logged in as {0}", lr.userInfo.userName);

FileHelperEngine engine = new FileHelperEngine(typeof(InlineHelpCSV));
InlineHelpCSV[] helps = engine.ReadFile("InlineHelp.csv") as InlineHelpCSV[];
List<SFDC_Metadata.CustomField> cfs = new List<SFDC_Metadata.CustomField>();

/*SFDC_Metadata.CustomField cf = new SFDC_Metadata.CustomField();
cf.fullName = "Service__c.Billing_End__c";
cf.label = "Billing End";
cf.type = SFDC_Metadata.FieldType.Date;
cf.inlineHelpText = "Updated from WEB APP";

SFDC_Metadata.UpdateMetadata mu = new SFDC_Metadata.UpdateMetadata();
mu.metadata = cf;
mu.currentName = "Service__c.Billing_End__c";

SFDC_Metadata.AsyncResult r = ms.update(new SFDC_Metadata.UpdateMetadata[] { mu })[0];
int waitTimeMilliSecs = 1000;

while (!r.done){
System.Threading.Thread.Sleep(waitTimeMilliSecs);
waitTimeMilliSecs *= 2;
r = ms.checkStatus(new string[] { r.id })[0];
Console.WriteLine("Status: {0}", r.state);
}
if (r.state == SFDC_Metadata.AsyncRequestState.Error){
Console.WriteLine("Error : {0} {1}", r.statusCode, r.message);
}else{
Console.WriteLine("Done, updated inlinehelptext");
}*/

Console.WriteLine("Inlinetext updates found {0}", helps.Length);
foreach (InlineHelpCSV a in helps)
{
Console.WriteLine(a.fullName + " - " + a.label + " - " + " - " + a.type + " - " + a.inlineHelpText);
SFDC_Metadata.CustomField cf = new SFDC_Metadata.CustomField();
cf.fullName = a.fullName;
cf.label = a.label;
//cf.type =
cf.inlineHelpText = a.inlineHelpText;
cfs.Add(cf);
}

Console.ReadLine();
}

 

So how i am supposed to dynamically get the metadata fieldtype enum?

if i use a page that calls a remote action it does not work on a sites page?

if i disable showheader it failes calling the apex webservice but if i enable show headers it works on the sites page why is this?

 

Uncaught {faultcode:'UNKNOWN_EXCEPTION', faultstring:'UNKNOWN_EXCEPTION: Site under construction', }

how i am wondering if this can be done in apex say for example i am in BST (GMT+00:00) and want to convert a datetime to CET (GMT+01:00)

 

ok so if i am in london and it is 1pm and now i want to convert this to berlins time it should be 2pm

 

i am trying

 

DateTime ii = DateTime.now();

ii.format('h:mm a', 'GMT+01:00');

 

but this always returns 1pm?

Hi i have sites page that renders a google map but if i disable the header it does not work?

I am fairly new to triggers and need help writing the following trigger:

 

Update customer numeric field on opportunity with count of attachements when a new attachment added to the opportunity.

 

 

  • November 22, 2010
  • Like
  • 0

Hi i am making an application that will update the description/inline help text (Custom Field) from a CSV file.

 

Now i have done this in c# and got the basics worked out, the problem i am hitting is that when i convert the csv record into a Custom Field for update, i have to keep setting the type, which is of type enum FieldType and these values differ from describe fieldtypes and so creating a mapping table is out of the question.

 

Here is some code:

 

static void Main(string[] args)
{
SFDC_Enterprise.SforceService sv = new SFDC_Enterprise.SforceService();
SFDC_Enterprise.LoginResult lr = sv.login("aaaa", "aaaaaaaaaaaaa");

// set up a MetdataService client
SFDC_Metadata.MetadataService ms = new SFDC_Metadata.MetadataService();
ms.SessionHeaderValue = new SFDC_Metadata.SessionHeader();
ms.SessionHeaderValue.sessionId = lr.sessionId;
ms.Url = lr.metadataServerUrl;

Console.WriteLine("Logged in as {0}", lr.userInfo.userName);

FileHelperEngine engine = new FileHelperEngine(typeof(InlineHelpCSV));
InlineHelpCSV[] helps = engine.ReadFile("InlineHelp.csv") as InlineHelpCSV[];
List<SFDC_Metadata.CustomField> cfs = new List<SFDC_Metadata.CustomField>();

/*SFDC_Metadata.CustomField cf = new SFDC_Metadata.CustomField();
cf.fullName = "Service__c.Billing_End__c";
cf.label = "Billing End";
cf.type = SFDC_Metadata.FieldType.Date;
cf.inlineHelpText = "Updated from WEB APP";

SFDC_Metadata.UpdateMetadata mu = new SFDC_Metadata.UpdateMetadata();
mu.metadata = cf;
mu.currentName = "Service__c.Billing_End__c";

SFDC_Metadata.AsyncResult r = ms.update(new SFDC_Metadata.UpdateMetadata[] { mu })[0];
int waitTimeMilliSecs = 1000;

while (!r.done){
System.Threading.Thread.Sleep(waitTimeMilliSecs);
waitTimeMilliSecs *= 2;
r = ms.checkStatus(new string[] { r.id })[0];
Console.WriteLine("Status: {0}", r.state);
}
if (r.state == SFDC_Metadata.AsyncRequestState.Error){
Console.WriteLine("Error : {0} {1}", r.statusCode, r.message);
}else{
Console.WriteLine("Done, updated inlinehelptext");
}*/

Console.WriteLine("Inlinetext updates found {0}", helps.Length);
foreach (InlineHelpCSV a in helps)
{
Console.WriteLine(a.fullName + " - " + a.label + " - " + " - " + a.type + " - " + a.inlineHelpText);
SFDC_Metadata.CustomField cf = new SFDC_Metadata.CustomField();
cf.fullName = a.fullName;
cf.label = a.label;
//cf.type =
cf.inlineHelpText = a.inlineHelpText;
cfs.Add(cf);
}

Console.ReadLine();
}

 

So how i am supposed to dynamically get the metadata fieldtype enum?