function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jwillansjwillans 

Updating a modified DescribeLayout

Is it possible to update a modified DescribeLayout object via the partner API? We are adding a new DescribeLayoutItem to a DescribeLayoutRow. We presumed that because DescribeLayoutRow has setLayoutItems, that this was not a read-only API, but we can't figure out the method of creating the update?

Thanks,

James
jwillansjwillans
Perhaps the question was not well phrased, let me try again - is it possible to programmatically define layouts via one of the remote partner/enterprise/metadata APIs?

We would really appreciate some input on this so we can make a decision on what direction our apex based application.

Thanks,

James
SuperfellSuperfell
No, there's no api to change layouts.
jwillansjwillans
Simon - Thanks for the response.

James
XactAndyXactAndy
Are there any plans to add this to the API, and if not, how could we put in a request?

The reason we want this is that we see an opportunity to generate an entire Apex
application including a default layout from a data model. The acceleration that this
would give to Apex development would be potentially huge. However, although we
can generate the data schema, we can't generate the layout.

Cheers,

Andy
SuperfellSuperfell
This has been discussed, but there are no concrete plans at this point, you should put something on the idea exchange for it.
RickyGRickyG
Andy -

Creating a default tab from a defined object is pretty straightforward - just associate the tab with the object.  It's not a real big step, so, if your goal is to create a default UI for your created objects, it isn't much work.

It would seem that no matter what your goal, you would have to end up with some kind of default layout.  Why not let your users simply use the default layout, once you have generated the object?  Especially since the process of tab creation is also where you assign tabs to profiles.

And duplicating all the layout modification capabilities of the salesforce.com environment would seem to be a significant amount of work to provide what is already there. 

Just offering up a way to think about the entire process to put it in a little more perspective.  The salesforce.com platform is a bit different from other environments, and if you try and force it to map to another paradigm, you sometimes miss some of the goodness inherent in the platform.

Hope this helps.

- Rick Greenwald
Developer Evangelist
XactAndyXactAndy
Thanks Rick.

Creating default tabs is fine. It's setting up the relationship layouts which is a bit more time consuming.
So for each object type we have to ensure that it has appropriate formating for the many to many relationships that reference the object type. Unfortunately, the model we are using has a lot of many to many relationships!

I agree, we're maybe pushing the envelope on Salesforce, but it's good to dream!

Cheers,

Andy
jwillansjwillans
Just to clarify, the problem is not specific just to relationships. When a field is added to a custom object through the web interface, then you get some default layout information for free. When a field is added to a custom object through the metadata interface, you don't get any default layout. It is necessary to edit every custom object and assign layout for the fields. This is time consuming when there are many objects and fields, which is the case for us.

James