-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't update manage package Page Layout #32
Comments
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. |
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'). |
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? |
Yes, that's right. Yes, "CA10" is our namespace. |
I'm wondering if this is restriction of the Metadata API, have you tried API v30.0? |
v29 is latest version available in maven central http://mvnrepository.com/artifact/com.force.api/force-metadata-api |
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). |
Wow that is inconsistant, glad you sorted it! Enjoy the API now! 👍 |
Thanks kbabintsev, your solution worked even in v39. |
Hi. I'm trying to update Layout:
but getting error "Required field is missing: fullName", because retrieved field fullName is null. It is possible update MP page layout through metadata api? Thank you.
The text was updated successfully, but these errors were encountered: