Sudhir Kumar
IndividualForum Replies Created
-
Sudhir
MemberJuly 5, 2017 at 9:17 am in reply to: Why we have to delete all records before creating a Master Detail relationship in a Master?You create a relationship field on the child object.
Can you explain clearly what you are asking - deleting all records of which object ?
-
Sudhir
MemberJuly 5, 2017 at 9:12 am in reply to: Can we create many to many relationship using lookup field in Salesforce Junction Object?Yes you can.. but there will be difference in terms of what you achieve thru master-detail.
-
Sudhir
MemberJune 30, 2017 at 3:54 pm in reply to: Check/UnCheck checkbox to show/hide textfield in SalesforceUse actionSupport, reRender and rendered to get this.
A sample example: reRenderRendered_page
-
Sudhir
MemberJune 30, 2017 at 3:19 pm in reply to: Check/UnCheck checkbox to show/hide textfield in SalesforceYou will have to use VF page to implement this. It won't be possible thru standard record page.
-
Sudhir
MemberJune 24, 2017 at 8:18 am in reply to: Generic Custom Visualforce Page for entire Salesforce Org like chatter?What do you mean by "all across the salesforce Org ".. Is this for all users of your org.
Something like home page component ?
-
Sudhir
MemberJune 23, 2017 at 12:16 pm in reply to: Write a Salesforce Trigger for account name should be a combination of lastnames of all its related contactsDid the solution work for you..
-
Sudhir
MemberJune 23, 2017 at 8:50 am in reply to: Write a Salesforce Trigger for account name should be a combination of lastnames of all its related contactsEnjoy the updated code I posted a while ago. 🙂
-
Sudhir
MemberJune 23, 2017 at 8:48 am in reply to: Write a Salesforce Trigger for account name should be a combination of lastnames of all its related contactsBased on the assumption in my previous post, updated the code here..UpdateAccountNameFromContactLastName2
This will work in all scenario - Insert, Update, Delete, Undelete of a Contact on an Account.
- This reply was modified 7 years, 6 months ago by Sudhir.
-
Sudhir
MemberJune 23, 2017 at 7:35 am in reply to: Write a Salesforce Trigger for account name should be a combination of lastnames of all its related contactsI see that this is not mentioned this (account name should be combination of both account name and contact last name) in your first post here. Please make sure you have your requirement clear in the first instance.
So your Account name should be "AccountName ContactLastName1 ContactLastName2 ContactLastName3 and so on" ? Confirm and then I will update the code and post.
-
Sudhir
MemberJune 22, 2017 at 7:06 pm in reply to: Get Meta Data specific to Application in SalesforceThere are multiple tools out there. You can use Eclipse Force.com IDE or ANT Migration Tool.
To retrieve apps in your organization, use the CustomApplication type name in the package.xml manifest file. You can either retrieve all apps or specify which apps to retrieve in the types section of package.xml.
To retrieve all apps in your organization—custom and standard apps, specify the wildcard character (*), as follows.
<types>
<members>*</members>
<name>CustomApplication</name>
</types>To retrieve a custom app, specify the app name.
<types>
<members>MyCustomApp</members>
<name>CustomApplication</name>
</types>To retrieve a standard app, add the standard__ prefix to the app name. For example, to retrieve the Chatter standard app, specify standard__Chatter.
<types>
<members>standard__Chatter</members>
<name>CustomApplication</name>
</types>You can also use workbench to get this.
Go to Tab --> Migration --> Retrieve --> Provide the packge.xml
-
Sudhir
MemberJune 22, 2017 at 3:59 pm in reply to: Write a Salesforce Trigger for account name should be a combination of lastnames of all its related contactsCheck this out.. UpdateAccountNameFromContactLastName
Update as per your trigger design template.
-
Sudhir
MemberJune 21, 2017 at 2:46 pm in reply to: How to delete child records in lookup relation (with Salesforce triggers)Check out this one.. Click here to get the solution DeleteChildrenFromOppty
You can optimize it further based on design patterns you use.
-
I got the issue in the process builder. There is a minor update in Step #3 in the attached solution document.
Process Builder - Account Owner Change Update Related Contact Owner
-
This worked for me thru Process Builder. Try to debug or go thru Process Builder error report to see the reason for failure.
As far as trigger is concerned, this could be the solution.. UpdateContactOwner
You can comply with your trigger template design pattern.
-
Hope it may help you. Click to see the solution..
Process Builder - Account Owner Change Update Related Contact Owner
-
Sudhir
MemberJune 19, 2017 at 3:32 pm in reply to: How can i write a Salesforce trigger to count number of completed task in a single contact?Click to get to the code: TaskRollUpOnContact
Hope it helps!
-
You mean to say if a user changes the Account owner, the related Contact owner should be updated to the same Account Owner?
-
You can achieve this using Process Builder. Simple and easy! Try once, and let me know if you need the whole solution.
-
Sudhir
MemberJune 17, 2017 at 4:45 am in reply to: Validation rule error when existing record is editedThis should wok for you. Taking Contact object as a reference..
AND(NOT(ISNEW()), FirstName == 'ok')
-
Sudhir
MemberJune 12, 2017 at 8:24 am in reply to: Salesforce Validation Rule while inserting a text value errorDid this work for you.
-
Sudhir
MemberJune 12, 2017 at 8:23 am in reply to: Salesforce Visualforce standard component to display data in a table?You can apex:pageBlockTable or apex:dataTable or apex:repeat depending upon your scenario. Generally, apex:pageBlockTable is the most used component.
-
Sudhir
MemberJune 9, 2017 at 2:54 pm in reply to: If i have system.debug() statement after adderror() method. Will system.debug() be statement executed in Trigger after adderror() method in Salesforce?True..but it will prevent any DML operation from happening.
-
Sudhir
MemberJune 9, 2017 at 2:40 pm in reply to: How to display a message when the trigger finishes?Firstly, please try to provide a use case of your scenario.
Now coming to your question, if the motive is to display a message on record detail page or layout, there is a way.
Create a Vf page with outputPanel having rendered attribute. ReRender this panel id when your controller gets the boolean flag passed from trigger or you can make a query if you are using a boolean field in trigger. Embed this VF age on the layout.
Initialize a boolean variable(you can use boolean field also) as false in the trigger. When your trigger finishes, paas a boolean variable as true into the vf page controller. Refer that boolean variable into vf page rendered attribute.
There could be other similar ways. You could give it a try.
-
Sudhir
MemberJune 9, 2017 at 2:50 am in reply to: Salesforce Validation Rule while inserting a text value errorYou may use something like this: IF(RIGHT(Text_Field_API__c , 4) == 'Text', true, false)
-
Sudhir
MemberJune 9, 2017 at 2:44 am in reply to: How to throw error for Salesforce external Id field null values?Throw error where ? Do you wanted to keep transaction information in an Integration Logger?
Make use of Database.upsert(), iterate over Database.upsertResult and use isSuccess() and getError() to get the error message if any.