2

I need to get the API names of all layouts in my salesforce org.I have used composite metadata api to perform queries in batch of 5 and then get the FullName.It works fine but i get a field integrity exception for some layouts.For e.g there is the Opportunity Layout

However when i do an SOQL query with tooling api , i can get the FullName just fine.

SELECT Id, FullName, ManageableState, LayoutType FROM Layout where id = '00h0N00000XySeQQAV'

Why is that happening and how can i fix it.

{  
    "compositeResponse":[  
        {  
            "body":[  
                {  
                    "message":"Entity 'CssDetail' not found.",
                    "errorCode":"FIELD_INTEGRITY_EXCEPTION"
                }
            ],
            "httpHeaders":{  

            },
            "httpStatusCode":400,
            "referenceId":"LayoutsFullName5id00h0N00000XySeMQAV"
        },
        {  
            "body":[  
                {  
                    "errorCode":"PROCESSING_HALTED",
                    "message":"The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders":{  

            },
            "httpStatusCode":400,
            "referenceId":"LayoutsFullName6id00h0N00000XySeNQAV"
        },
        {  
            "body":[  
                {  
                    "errorCode":"PROCESSING_HALTED",
                    "message":"The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders":{  

            },
            "httpStatusCode":400,
            "referenceId":"LayoutsFullName7id00h0N00000XySeOQAV"
        },
        {  
            "body":[  
                {  
                    "errorCode":"PROCESSING_HALTED",
                    "message":"The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders":{  

            },
            "httpStatusCode":400,
            "referenceId":"LayoutsFullName8id00h0N00000XySePQAV"
        },
        {  
            "body":[  
                {  
                    "errorCode":"PROCESSING_HALTED",
                    "message":"The transaction was rolled back since another operation in the same transaction failed."
                }
            ],
            "httpHeaders":{  

            },
            "httpStatusCode":400,
            "referenceId":"LayoutsFullName9id00h0N00000XySeQQAV"
        }
    ]
}
  • 2
    What API version are you talking to? First thing to do is make sure you're on the latest API version. – David Reed Nov 8 '18 at 12:31
  • @DavidReed I am using API 44.0 – Khavish Nov 12 '18 at 5:28
  • Can you include an example of the composite request you're making that fails? I see that the Tooling API works (I tried it in my own sandbox). Ideally, if you can reproduce it with a standard layout, that would be useful. – David Reed Nov 13 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.