Skip to main content
Puja Gupta が「#Apex」で質問
Hello All

Please tell me correct answers of below question :

Ques:1  A developer needs to display all the available field for an object.

In which two ways can the developer retrieve the available fields if the variable myObject represents name of the object.

Choose 2 answers

Use myObject.sObjectType.getDescribe().fieldSet() to return a set of fields

Use SObjectType.myObject.fields.getMap() to return a map of fields

Use Schema.describeSObjects( new string[][myObject])[0].fields.getMap() to return a map of fields

Use getGlobalDescribe().get(myObject).getDescribe().fields.getMap() to return a map of fields

Ques2: What are the two features of Heroku connect?

Choose 2 answers

Near real time sync between Heroku postgres and Salesforce

Bidirectional syncs, allowing data to be written into salesforce(right)

Realtime sync between salesforce and postgres

Displaying data from an external data store vs external objects

 Thanks in advance.
2 件の回答
  1. 2018年8月8日 15:29
    Hi Puja,

    Ques:1  A developer needs to display all the available field for an object.

    Ans : 2 and 4

     

    Map <String, Schema.SObjectField> fieldMap = schema.getGlobalDescribe().get('account').getDescribe().fields.getMap();

    system.debug('==fieldMap=='+fieldMap);

    ======================

    Map<String, Schema.SObjectField> setfields = schema.SobjectType.account.fields.getMap();

    system.debug('==setfields=='+setfields);

    Ques2: What are the two features of Heroku connect?

    Bidirectional sync, allowing data to be written into SFDC

    Displaying data from an external data store via External Objects

    https://www.proprofs.com/discuss/q/1291278/what-are-two-features-of-heroku-connect-choose-answers

    Hope this helps you!

    If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

    Thanks

    Varaprasad

    @For  Support: varaprasad4sfdc@gmail.com