Forum Replies Created

Viewing 1 - 25 of 87 posts
  • Archit

    Member
    March 30, 2018 at 12:09 pm

    uniqueness a common word that everyone understand but here the uniqueness determines the specific field or object for which you want to fetch related data like

    if there is any custom field Date is there in any object which call as date__c in soql so in terms of soql you can determine "date__c" as unique. If you try to fetch the related records by using any other word it will not help you for your findings.

    Hope It Would be helpful !

  • Archit

    Member
    March 30, 2018 at 11:24 am

    Hello,

    Call the below trigger in apex class you can achieve the functionality what you want

    trigger IPAapproved on Outbound_Sales_Order__c (after update) {
    
    // Only do work when the field has changed
    Map<Id, Outbound_Sales_Order__c> changed = new Map<Id, Outbound_Sales_Order__c>();
    for (Outbound_Sales_Order__c oso : Trigger.new) {
    Outbound_Sales_Order__c old = Trigger.oldMap.get(oso.Id);
    if (oso.Buyer_Approved__c != old.Buyer_Approved__c) {
    changed.put(oso.Id, oso);
    }
    }
    if (changed.size() > 0) {
    // Only update when the field has the wrong value
    List<SO_Detail__c> updates = new List<SO_Detail__c>();
    for (SO_Detail__c detail : [
    SELECT Id, Outbound_Sales_Order__c, Buyer_Approved_Flag__c
    FROM SO_Detail__c
    WHERE Outbound_Sales_Order__c IN :changed.keySet()
    ]) {
    Outbound_Sales_Order__c oso = changed.get(detail.Outbound_Sales_Order__c);
    Boolean requiredFlag = oso.Buyer_Approved__c != null;
    if (detail.Buyer_Approved_Flag__c != requiredFlag) {
    detail.Buyer_Approved_Flag__c = requiredFlag;
    updates.add(detail);
    }
    }
    update updates;
    }
    }
  • Archit

    Member
    March 30, 2018 at 11:20 am

    Through standard functionality in Salesforce you can't customize clone button but we can achieve this by overwriting the existing clone button.

  • Archit

    Member
    March 30, 2018 at 11:16 am

    In according to the Salesforce standard functionality it is not possible but for achieving same there are multiple apps in  AppExchange available to do so.

  • Archit

    Member
    March 30, 2018 at 11:12 am

    Yes, it is necessary to have  this kind of formatting because it shows uniqueness.

  • Archit

    Member
    March 30, 2018 at 10:39 am

    Clone : means creating a new record with the existing details of another reord.

    Here is the example:

    Account acc = [SELECT Name, Type FROM Account LIMIT 1];
    
    Account accCopy = acc.clone(false, false, false, false);
    

    if you insert accCopy, it will be the exact copy of acc.

    DeepClone : creating a new record with the existing details of another record along with related lists.

  • Archit

    Member
    March 30, 2018 at 8:28 am

    Hello Ankit,

    In short we can say Scope will return the List of record based on your start method in batch class.

    Thanks!

  • Archit

    Member
    March 30, 2018 at 8:27 am

    Hello Ankit,

    Scheduling apex:

    To execute any class at specific time we use scheduling apex.

     

    Batch Apex:

    It divides the whole process in batches (each batch handles 200 records at a time).

    To handle large number of data we have to batch apex.

    Also used for overcome the governing limits.

  • Archit

    Member
    March 30, 2018 at 8:17 am

    Hello Ankit,

    No, You can’t use the following sObjects with other sObjects when performing DML operations in the same transaction.

    Thanks!

  • Archit

    Member
    March 29, 2018 at 12:44 pm

    Hello Ankit,

    I think you should enter the remote URL in remote settings under the setup menu in Salesforce org. Once the URL will be there you can be easily authorise the URL.

    Thanks!

  • Archit

    Member
    March 29, 2018 at 12:33 pm

    Hello Amresh,

    If you start using Angular you will probably encounter observables when setting up your HTTP requests. So let’s start there.In Angular we can subscribe to an observable in two ways:

    • We subscribe to an observable in our template using the async pipe.
    • We subscribe to the observable ourselves using the actual subscribe() method

    Thanks!

  • Archit

    Member
    March 29, 2018 at 12:33 pm

    Dependency Injection is a powerful pattern for managing code dependencies. This cookbook explores many of the features of Dependency Injection (DI) in Angular.

    When Angular creates the AppComponent, the dependency injection framework creates an instance of the LoggerService and starts to create the UserContextService. The UserContextService needs the LoggerService, which the framework already has, and the UserService, which it has yet to create. The UserService has no dependencies so the dependency injection framework can just use new to instantiate one

  • Archit

    Member
    March 29, 2018 at 12:32 pm

    To use the Component we declare it inside a template and use a custom attribute on the element itself.

    const app = {
    template: `
    <div>
    My Counter:
    <counter
    count="$ctrl.count"
    on-update="$ctrl.countUpdated($event);"></counter>
    </div>
    `,
    controller() {
    this.count = 2;
    this.countUpdated = (event) => {
    this.count = event.count;
    };
    }
    };

    angular
    .module('app')
    .component('app', app);

  • Archit

    Member
    March 29, 2018 at 12:32 pm

    The nested component exposes a property it can use to receive input from its container using the @Input decorator.

    For the below code nested component is ready to receive input from it's parent component.

    @Component({
    selector: 'child-selector',
    template: 'child.component.html'
    })
    export class ChildComponent {
    @Input() title:string;
    }

    In the container component, we need to define the property we want to pass to the nested component. We call it childTitle:

    @Component({
    selector: 'parent-selector',
    template: 'parent.component.html',
    directives: [ChildComponent]
    })
    export class ParentComponent {
    childTitle:string = 'This text is passed to child';
    }

    Now the container component should pass the value of childTitle to the nested component by settings this property with property binding

    <div>
    <h1>I'm a container component</h1>
    <child-selector [title]='childTitle'></child-selector>
    </div>

    Hope it helps!

  • Archit

    Member
    March 29, 2018 at 12:32 pm

    For every Angular component you write, you may define not only an HTML template, but also the CSS styles that go with that template, specifying any selectors, rules, and media queries that you need.

    One way to do this is to set the styles property in the component metadata. The styles property takes an array of strings that contain CSS code. Usually you give it one string, as in the following example:

    @Component({
    selector: 'app-root',
    template: `
    <h1>Tour of Heroes</h1>
    <app-hero-main [hero]="hero"></app-hero-main>
    `,
    styles: ['h1 { font-weight: normal; }']
    })
    export class HeroAppComponent {
    /* . . . */
    }
    
  • Archit

    Member
    March 29, 2018 at 10:10 am

    Hello Amresh,

    When we move from older version to newer version the class inside the body get changed of older version. so we can call  css inherited by the class which is inside the body to reach out to newer version.

    Thanks!

  • Archit

    Member
    March 29, 2018 at 9:49 am

    Hello Ankit,

    Thanks for your explanation it really helps

  • Archit

    Member
    March 29, 2018 at 8:51 am

    <apex:page standardcontroller="Account" recordsetvar="accounts">
    <apex:pageblock title="Account List">
    <apex:form>
    <apex:pageblocksection>
    <apex:datatable value="{!accounts}" var="a">
    <apex:column value="{!a.name}"></apex:column>
    </apex:datatable>
    </apex:pageblocksection>
    <apex:panelgrid columns="2">
    <apex:commandlink action="{!previous}">Previous</apex:commandlink>
    <apex:commandlink action="{!next}">Next</apex:commandlink>
    </apex:panelgrid>
    </apex:form>
    </apex:pageblock>
    </apex:page>

  • Archit

    Member
    March 29, 2018 at 8:46 am

    Hello,

    System objects are the objects which are available in the Salesforce org like we can say all the standard objects.

    Thanks

  • Archit

    Member
    March 29, 2018 at 8:34 am

    Hello,

    Entering the callback URL (endpoint) that Salesforce calls back to your application during OAuth. It’s the OAuth redirect URI. If you enter multiple callback URLs, at run time Salesforce matches the callback URL value specified by the app with one of the values in Callback URL. It must match one of the values to pass validation.

    Thanks!

  • Archit

    Member
    March 29, 2018 at 8:33 am

    Hello Neha,

    There are several resources to have a guide for limitation Congo and Nintex either you can join community of nintex or reach out to customer care for same.

    Thanks!

  • Archit

    Member
    March 29, 2018 at 4:55 am

    User u = new user();
    u.LastName = ‘Test Code’;
    u.Email = ‘[email protected]’;
    u.Alias = ‘Tcode’;
    u.Username = ‘[email protected]’;
    u.CommunityNickname = ‘test12’;
    u.LocaleSidKey = ‘en_US’;
    u.TimeZoneSidKey = ‘GMT’;
    u.profileId = ’00e28000001Xsf3′;
    u.LanguageLocaleKey = ‘en_US’;
    u.EmailEncodingKey = ‘UTF-8’;
    insert u;

  • Archit

    Member
    March 29, 2018 at 4:55 am

    An app developed by Salesforce Lab – Magic Mover for Notes And Attachments to Lightning Experience for achieving the same.

     

  • Archit

    Member
    March 29, 2018 at 3:53 am

    Schema.DescribeSObjectResult r = systemObjectType.getDescribe();
    Map<String,Schema.SObjectField> M = r.fields.getMap();
    for(String fieldName : M.keySet())
    {
    Schema.SObjectField field = M.get(fieldName);
    Schema.DescribeFieldResult F = field.getDescribe();
    //A nillable field can have empty content. A isNillable Boolean non-nillable field must have a value for the object to be //created or saved.
    // if F.isNillable() is false then field is mandatory
    Boolean isFieldreq = F.isNillable()

  • Archit

    Member
    March 28, 2018 at 7:41 pm

    System.Assert accepts two parameters, one (mandatory) which is the condition to test for and the other a message (optional) to display should that condition be false.

    System.AssertEquals and System.AssertNotEquals both accepts three parameters; the first two (mandatory) are the variables that will be tested for in/equality and the third (optional) is the message to display if the assert results in false.

Viewing 1 - 25 of 87 posts