Giter Site home page Giter Site logo

Comments (9)

afawcett avatar afawcett commented on July 30, 2024

Yes it is possible to do this https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/MetadataServiceExamples.cls#L696. What i have noticed is that for some reason if you get the layout name wrong it returns a blank layout. So double check your layout name via listMetadata or using the Salesforce Developer Workbench tool which also has a means to list metadata.

from apex-mdapi.

kbabintsev avatar kbabintsev commented on July 30, 2024

Yes, name was wrong. Valid name is 'CA10__CaAwsCloudTrailEvent__c-AWS CloudTrail Event Layout' (CA10 is our namespace). But I get the same error. I tried to do this with Java API v29 (http://www.salesforce.com/us/developer/docs/api_meta/), but I got the same result. Everything works well with dev org (where name is 'CaAwsCloudTrailEvent__c-AWS CloudTrail Event Layout').

from apex-mdapi.

afawcett avatar afawcett commented on July 30, 2024

I see so it works if you try to edit a unmanaged layout, but if you try to edit a managed package installed layout it fails? Is CA10 your managed package namespace?

from apex-mdapi.

kbabintsev avatar kbabintsev commented on July 30, 2024

Yes, that's right. Yes, "CA10" is our namespace.

from apex-mdapi.

afawcett avatar afawcett commented on July 30, 2024

I'm wondering if this is restriction of the Metadata API, have you tried API v30.0?

from apex-mdapi.

kbabintsev avatar kbabintsev commented on July 30, 2024

v29 is latest version available in maven central http://mvnrepository.com/artifact/com.force.api/force-metadata-api

from apex-mdapi.

kbabintsev avatar kbabintsev commented on July 30, 2024

I solved this. It works if I try 'CA10__CaAwsCloudTrailEvent__c-CA10__AWS CloudTrail Event Layout'. btw listMetadata returns 'CA10__CaAwsCloudTrailEvent__c-AWS CloudTrail Event Layout' (without prefix).

from apex-mdapi.

afawcett avatar afawcett commented on July 30, 2024

Wow that is inconsistant, glad you sorted it! Enjoy the API now! 👍

from apex-mdapi.

adam84luong avatar adam84luong commented on July 30, 2024

Thanks kbabintsev, your solution worked even in v39.

from apex-mdapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.