• Manisha Kumari 34
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hello all,

I tried to generate Zoom JWT Token automatically but I am getting below error.

{"reason":"grant type urn:ietf:params:oauth:grant-type:jwt-bearer is not supported from token endpoint","error":"invalid_request"}

I am using below code 

private final static String AUTH_ENDPOINT = 'https://zoom.us/oauth/token';
System.debug('No cached  token exists, fetching a new one');
            Auth.JWT jwt = new Auth.JWT();
            jwt.setAud(AUTH_ENDPOINT);
            jwt.setIss('mN7wu5C5SXuguBTsAoLBGw' );
            jwt.setAdditionalClaims(new Map<String, Object>{'scope' => 'meeting:write'});
            
            // Create the object that signs the JWT bearer token with the certificate from Certificate Management
            Auth.JWS jws = new Auth.JWS(jwt, 'Zoom_JWT');
            
            // POST the JWT bearer token.
            // Will throw a Auth.JWTBearerTokenExchange.JWTBearerTokenExchangeException with the error in the message
            // the API fails to return the  token, the response is not in JSON format, or if the API
            // returns a non-200 response code.
            Auth.JWTBearerTokenExchange bearer = new Auth.JWTBearerTokenExchange(AUTH_ENDPOINT, jws);
            String token = null;
            if (test.isRunningTest()){
                System.debug('System is in testing');
                token = '234234';
            }else{
              
                System.debug('System is not in testing');
                
                // Get the  token
                System.HttpResponse resp = bearer.getHttpResponse();
                
                String respBody = resp.getBody();
                System.debug('Response::' + respBody);
                if(resp.getStatusCode() == 200){
                    System.debug('Response::' + respBody);
                    Map<String, Object> jsonMap = (Map<String, Object>) JSON.deserializeUntyped(respBody);
                    token = (String)jsonMap.get('id_token');
                    cacheToken(token);
                }
            }
            
    
    

Hi i have a two custom objects one is employe__c and another one is comapny_report __c which doesnot have any relationship.
for employe__c i have a lookup relationship with Department__c 
for Departement__c i have lookup relationship with Company__c
and for company_report__c i have a lookup relationship with Department__c  and Company__c
 comapny__c has only one record with ABC company
and there are three Departments in Department__c 
Department 1
Department 2
Department 3
for the same company which has been selected from Parent Object Company

In employee__c object i have fields
EmpName;
Department which is selected from the parent object
Joining Date

In company_report__c i have fields
Name with autonumber;
Departement  ---> lookup relation with Departement__c
company ---> lookup relation with company__c
Quarter
Employee Count
Year

My requirment is if i created a record in employe__c with name departement and joining date  automatically record need to be created in the comapny_report__c  
I can create it.

But when i create an another record in the emp object with name and same department and same Quarter which is between 01 Jan to 31 Mar 2019 in company_report__c this existing record which has been created earlier should be updated with the count 2 previosuly which is one 
I would like the mandatory requirement for the closed date to be removed.
If the developers read the posted comments on this subject then they would see that a lot of people are hindered by this date.  I, myself have to put in a future date to close it even though the project is still ongoing.  Printing off reports on ongoing projects is a nightmare since they all have closed dates.

It would be appreciated if the mandatory requirement be removed.  Another option is to add an Estimated Date.

Thank you.

Sandy Rice
Solid Rock Fencing Ltd.
sandy@solidrockfencing.ca
778-387-0172
public class D_ConstantContact_Response {
    public cls_meta meta;
  public cls_results[] results;
  public class cls_meta {
    public cls_pagination pagination;
  }
  public class cls_pagination {
        public string next_link;
  }
  public class cls_results {
    public String id;  
    public String status;  
    public cls_lists[] lists;
    public cls_email_addresses[] email_addresses;
    public String prefix_name;  //
    public String first_name;  
    public String middle_name;  //
    public String last_name; 
    public String company_name;  //
    public String home_phone;  //
    public String work_phone;  //
    public String cell_phone;  //
    public String created_date;  //2017-10-31T20:38:14.000Z
    public String modified_date;  //2017-10-31T20:38:14.000Z
  }
  public class cls_lists {
    public String id;  
    public String status;  /
  }
  public class cls_email_addresses {
    public String id; 
    public String status;  
    public String email_address;  
}


 
  • November 28, 2018
  • Like
  • 0
Here is my code for a separate section and a column.I need to 2 two columns as i have many field to show on that section of layout.
Can anyone help how to divide a section in two columns by apex.I am using Metadata API currently.
if(layout.layoutSections==null)
            layout.layoutSections = new List<MetadataService.LayoutSection>();
        MetadataService.LayoutSection newLayoutSection = new MetadataService.LayoutSection();
        newLayoutSection.customLabel = true;
        newLayoutSection.detailHeading = true;
        newLayoutSection.editHeading = true;
        newLayoutSection.label = 'Keyword fields';
        newLayoutSection.style = 'TwoColumnsLeftToRight';}

 
hi ,

I have to create google chart from apex class and insert the chart into attachement.

Thanks.