• Chiyaan Ananth
  • NEWBIE
  • 50 Points
  • Member since 2008

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

Hi All,

 

I have added a custom link in Accounts to a custom report.  And I use https://na2.salesforce.com/" + reportId + "?pv0={!Account.Name} which works great in my developer account.  Does the URL(https://na2.salesforce.com) varies for trial and production accounts?  I tried with a trial account where the URL looks like https://ap1.salesforce.com/.  So I am asked to reenter my login details to access the page.  So what would be the solution for this.  I do not want the user to sign twice to access the report.

 

Any help on this would be greatly appreciated.

 

Ananth Chellathurai

Blog

Hello Everyone,

 

I am trying to update accounts page layout with a custom link.  I managed to create a custom link which is great.  Now I am able to retrieve the page layout through retrieve call.  Which gives a zip file,  is there a way I could update the layout through the Metadata API?  So far I have tried this,

 

     Layout co = new Layout();

        co.setFullName("Account-Trial2");

        

        LayoutSection layoutSection = new LayoutSection();

        layoutSection.setStyle(LayoutSectionStyle.CustomLinks);

        layoutSection.setCustomLabel(true);

        layoutSection.setLabel("Custom Links");

        LayoutColumn layoutColumn = new LayoutColumn();

        LayoutItem[] layoutItemList = new LayoutItem[1];

        LayoutItem layoutItem = new LayoutItem();

        layoutItem.setCustomLink("Infosmart_Results");

        layoutItemList[0] = layoutItem;

        layoutColumn.setLayoutItems(layoutItemList);

        LayoutColumn[] layoutColumnList = new LayoutColumn[1];

        layoutColumnList[0] = layoutColumn;

        layoutSection.setLayoutColumns(layoutColumnList);

        LayoutSection[] layoutSectionList = new LayoutSection[1];

        layoutSectionList[0] = layoutSection;

        co.setLayoutSections(layoutSectionList);

        

        UpdateMetadata updateMetadata = new UpdateMetadata();

        updateMetadata.setMetadata(co);

        updateMetadata.setCurrentName("Trial");   // co.getFullName(); 

 

This code leads to the following exception

 

Error status code: FIELD_INTEGRITY_EXCEPTION

Error message: Layout must contain an item for required layout field: Name

The object state is Error

 

What am I missing here.  Any help will be greatly appreciated.

 

Regards

Ananth Chellathurai

Blog 

 

 

Is there a way I can add a new custom link to my accounts page?

 

Any help would be greatly appreciated.

 

Ananth Chellathurai

http://ananthchellathurai.blogspot.com/ 

Message Edited by Chiyaan Ananth on 07-06-2009 02:06 AM

Hi,

 

I am trying to create a custom link from my accounts which takes me to my custom tab, where I have created a filtered view.   I am trying like this

 

https://na2.salesforce.com/a00{!IF(CONTAINS(Account.Name , 'Test') , "?fcf=00B40000005ikx0" ,'/o' )} 

 

When I don't have the word test in my account name it takes me to the proper page.  But the account name contains test it doesn't work.  It is because the "? and =" are not recogonized, and been converted to %3F and %3D.  Any help on how to do this will be greately appreciated.

 

Ananth Chellathurai 

Message Edited by Chiyaan Ananth on 06-06-2009 04:36 AM

How to insert multiple records of my custom object.  Any sample code could help.  Can I make a file based deploy to insert records for my cutom object.  Is there a way I could do through my java webservices?  Any help on this would be greatly appreciated.

 

Thanks in advance. 

Ananth 

Message Edited by Chiyaan Ananth on 03-12-2009 04:54 AM

I am trying file based retrieval.  As wild card * option is not allowed for dashboard,  how should I mention the members to retrieve my dashboards?

I have tried using listMetadata() method to retrieve the full name of my dashboard.  And I have found the full name to be results/TrialDashboard.  But when I mention this in the package.xml,  I am not able to retrive my dashboards.

 

    <types>

     <members>results</members>

        <members>results/TrialDashboard</members>

        <name>Dashboard</name>

    </types>

didn't help too. 

Thanks in advance. 

Message Edited by Chiyaan Ananth on 03-05-2009 11:52 PM
Message Edited by Chiyaan Ananth on 03-06-2009 12:55 AM

I have downloaded the latest enterprise and metadata wsdl and generated client code out of it.  When I tried to run the CreateSample for custom objects,  I get this exception "No operation available for request {http://soap.sforce.com/2006/04/metadata}create"

 

What do I miss here? 

I am trying to execute the CreateSample with the generated java code from my metadata wsdl.  Once when I run the application,  I get a message like

 

- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

 

After login when I hit enter I get the following exception message "No operation available for request {http://soap.sforce.com/2006/04/metadata}create" 

 

The sample code from the metadata api had like

metadatabinding._setProperty(MetadataBindingStub.ENDPOINT_ADDRESS_PROPERTY,

                loginResult.getMetadataServerUrl()); 

But there is no method defined as getMetadataServerUrl() in LoginResult in my enterprise package.  So I have chenged getMetadataServerUrl() to getServerURL()

Can some one help me in what do I miss here.

Thanks in Advance. 

I have succeeded to modify my s-control from my webservices API.  I do not see Dashboard as a child of SObject.  So is there a way I could create a new dashboard with my existing s-control,  from webservice?

 

Thanks in Advance 

I need to include my application results pushed into an area on the SFDC dashboard. Please guide me the ways to do this.

Ananth Chellathurai

Hi All,

 

I have added a custom link in Accounts to a custom report.  And I use https://na2.salesforce.com/" + reportId + "?pv0={!Account.Name} which works great in my developer account.  Does the URL(https://na2.salesforce.com) varies for trial and production accounts?  I tried with a trial account where the URL looks like https://ap1.salesforce.com/.  So I am asked to reenter my login details to access the page.  So what would be the solution for this.  I do not want the user to sign twice to access the report.

 

Any help on this would be greatly appreciated.

 

Ananth Chellathurai

Blog

Hello Everyone,

 

I am trying to update accounts page layout with a custom link.  I managed to create a custom link which is great.  Now I am able to retrieve the page layout through retrieve call.  Which gives a zip file,  is there a way I could update the layout through the Metadata API?  So far I have tried this,

 

     Layout co = new Layout();

        co.setFullName("Account-Trial2");

        

        LayoutSection layoutSection = new LayoutSection();

        layoutSection.setStyle(LayoutSectionStyle.CustomLinks);

        layoutSection.setCustomLabel(true);

        layoutSection.setLabel("Custom Links");

        LayoutColumn layoutColumn = new LayoutColumn();

        LayoutItem[] layoutItemList = new LayoutItem[1];

        LayoutItem layoutItem = new LayoutItem();

        layoutItem.setCustomLink("Infosmart_Results");

        layoutItemList[0] = layoutItem;

        layoutColumn.setLayoutItems(layoutItemList);

        LayoutColumn[] layoutColumnList = new LayoutColumn[1];

        layoutColumnList[0] = layoutColumn;

        layoutSection.setLayoutColumns(layoutColumnList);

        LayoutSection[] layoutSectionList = new LayoutSection[1];

        layoutSectionList[0] = layoutSection;

        co.setLayoutSections(layoutSectionList);

        

        UpdateMetadata updateMetadata = new UpdateMetadata();

        updateMetadata.setMetadata(co);

        updateMetadata.setCurrentName("Trial");   // co.getFullName(); 

 

This code leads to the following exception

 

Error status code: FIELD_INTEGRITY_EXCEPTION

Error message: Layout must contain an item for required layout field: Name

The object state is Error

 

What am I missing here.  Any help will be greatly appreciated.

 

Regards

Ananth Chellathurai

Blog 

 

 

Is there a way I can add a new custom link to my accounts page?

 

Any help would be greatly appreciated.

 

Ananth Chellathurai

http://ananthchellathurai.blogspot.com/ 

Message Edited by Chiyaan Ananth on 07-06-2009 02:06 AM

Hi,

 

I am trying to create a custom link from my accounts which takes me to my custom tab, where I have created a filtered view.   I am trying like this

 

https://na2.salesforce.com/a00{!IF(CONTAINS(Account.Name , 'Test') , "?fcf=00B40000005ikx0" ,'/o' )} 

 

When I don't have the word test in my account name it takes me to the proper page.  But the account name contains test it doesn't work.  It is because the "? and =" are not recogonized, and been converted to %3F and %3D.  Any help on how to do this will be greately appreciated.

 

Ananth Chellathurai 

Message Edited by Chiyaan Ananth on 06-06-2009 04:36 AM

How to insert multiple records of my custom object.  Any sample code could help.  Can I make a file based deploy to insert records for my cutom object.  Is there a way I could do through my java webservices?  Any help on this would be greatly appreciated.

 

Thanks in advance. 

Ananth 

Message Edited by Chiyaan Ananth on 03-12-2009 04:54 AM

I am trying file based retrieval.  As wild card * option is not allowed for dashboard,  how should I mention the members to retrieve my dashboards?

I have tried using listMetadata() method to retrieve the full name of my dashboard.  And I have found the full name to be results/TrialDashboard.  But when I mention this in the package.xml,  I am not able to retrive my dashboards.

 

    <types>

     <members>results</members>

        <members>results/TrialDashboard</members>

        <name>Dashboard</name>

    </types>

didn't help too. 

Thanks in advance. 

Message Edited by Chiyaan Ananth on 03-05-2009 11:52 PM
Message Edited by Chiyaan Ananth on 03-06-2009 12:55 AM

I have downloaded the latest enterprise and metadata wsdl and generated client code out of it.  When I tried to run the CreateSample for custom objects,  I get this exception "No operation available for request {http://soap.sforce.com/2006/04/metadata}create"

 

What do I miss here? 

I've spent a while going through the Metadata and Apex documentation looking for a way to add a custom button to an object's detail page programatically, and can't seem to find anything.
 
Our project team is attempting to create a wizard that runs post-package-installation that can create custom buttons on arbitrary objects depending on the particular org's object schema some one-time user input.
 
As an example, I'd like to be able to attach a custom button w/ user-defined text and url on the Account object details page without requiring the user to enter setup -> customize -> accounts -> buttons and links, and instead, do it through apex or one of the APIs.
 
Would anyone be able to tell me if this is even possible on the force platform, and if so, the best way to go about it?
 
Thanks.
 
 
 


Message Edited by si402 on 01-19-2009 03:03 PM
  • January 19, 2009
  • Like
  • 0
I can't find a way to get a layout object back from the API.  I have been able to successfully create a page layout with the API, but I would like to read exisiting layouts to use for updates.  I have tried to use the Describe objects from the Data API, but they don't seem to have all of the information that I need to build a new layout.  I started with the DescribeLayoutResult object and drilled down to try to do a deep copy, but it's not a copy because the objects are so different, infact, I don't think that the Describe objects have all the information needed to create a new Object. Anyone know how to get a Layout object back from Salesforce?
Hi,
some days ago I posted the message below.

http://community.salesforce.com/sforce/board/message?board.id=JAVA_development&thread.id=5269

I'm not able to set the Custom Tab visibility with Metadata API.
could you help me?

thank you very much,
Emanuela
Hi everyone,
I've build a custom tab through Metadata API. Now, I can see it into custom tab list in may Salesforce Account but I cannot make it visible in all my applications. How can I set the tab visibility through Metadata API?

thank's a lot,
Emanuela
Hi All,
 
How to insert a record to custom object using soql query object from the API.
 
Thanks in advance.
Aravind
Hi all,

I'm a newbie using salesforce Webservices API. My question is pretty straightfoward. Is there a way to create a custom link through salesforce Webservices API? If there is, may someone please write the code here to show me how? I would appreciate it if this is done in Java or VB.

Thank you VERY MUCH!!
Take care