How to display Attribute Value in Acumatica report header? - attributes

How to display Attribute Value in Acumatica report header?
Requirement is to display Acumatica Business Account information Attribute in the Header information of a Report. For example, there is an Attribute say "Special Member" and it holds the Value "Yes". This information should be displayed in the Report Header along with the other BAccount table fields.
Format:
Report Header
----------------------
BAccount Name: XYZ Company
Special Member: Yes
----------------------
Report Detail:
-----------------------
Activities List...
Can anyone indicate what Join we need to use to achieve this? In the Acumatica Report designer there is only one place where we can define Relationships. How to relate this information and that too pull that information on the Header of the Report?

there are these four DACs that deal with attributes viz.
CSAnswers
CSAttribute
CSAttributeDetail
CSAttributeGroup
Linking back to specific entity (in your case BAccount) is based on CSAttributeGroup.Type and CSAttributeGroup.AttributeID joined to CSAnswers.EntityType and CSAnswers.AttributeID where CSAnswers.EntityID = BAccountID
Hope this will help!
thnx

Related

Display Customer Activity Notes on Sales Order After CustomerID entered

I have a request from a pop up of the Customers Activity Notes after the Customer ID has been entered on a sales order. Currently they have set up specific instructions for entering an order for customer (could be different for each customer). We have entered them under the customers Activity Notes with a specific ID in the subject field. The notes will be in the body of the activity.
Rather then copy this info to the Sales Order Activity Notes, they would just like to display the Activity Notes from the Customers Activity Notes.
Has anyone done something like this or have any though as to how this could be accomplished.
You could proceed one of two ways:
First way is you could create a button in which it would fetch the associated customer's notes and display them.
The second way is that you could override the PXSelecting action for the page and make sure the Customer ID selector has commit changes set to true.
Either way you go, you will need to fetch the notes using the customer's NoteID field from the Note table. One method would be:
BAccount cust = PXSelect<BAccount, Where<BAccount.bAccountID, Equal<Current<SOOrder.customerID>>>>.Select(Base);
Note custNote = PXSelect<Note, Where<Note.noteID, Equal<Required<BAccount.noteID>>>>.Select(Base, cust.NoteID);
This should get you the result you desire. You can then display it however you choose.
NOTE: Please let me know if there are any syntax errors and I will correct them ASAP.

Acumatica Report Designer Repeating first record of mySQL view

Created a view and added to DAC and can view correctly in Generic Enquiry. However when added in Report Designer it returns correct number of rows but the data is just repeated form the first row. Any ideas?
Ensure your view contains CompanyID field and DAC has proper key(s) defined.

add value from text field to look up field crm plugin

thank first all to helping me, out
I have got a big problem
I trying to run a post operation plugin in crm 2013
I have got, to Entities One is "account" and the other one is "sales"
My problem is :
The filed in entities account is lookup filed
And the filed in sales is text filed
The value from the sales Test filed I have to add in the look up filed
I have allready retrieve the value from the sales test field
Only problem is I can’t add the value in the look up:
get an error message.
It would be appreciated if you can share the error message which you are getting.
Assuming that you are trying to set the primary contact for the account, I would have coded as follows,
Entity account=new Entity("account");
account.Id=;
account["primarycontactid"]=new EntityReference("contact",);
service.Update(account);
In this case i again assume the text value which you have retrieved is a Guid value. If not, get that value from CRM using a service.Retrive() or service.RetrieveMultiple() methods and do it as above.
Hope this helps!!!.

How to sort items in view by field of lookup entity?

Is there any way to enable sorting on column which represents field of related entity?
For example, Case contains one lookup field - Contact. In view I added FullName and Email of Contact. Header in view of these two columns is not clickable (Sort is not enabled).
No. Sorting is not possible for fields of a referenced entity.
If you really need this, you have to build a custom view (html page) or for example a report

Possibilities within CMR 2011

Consider the following requirements for CRM 2011:
2 custom entities are needed, let's say EntityA and EntityB.
EntityA contains the following fields:
ContactA (lookup on contact)
ContactB (lookup on contact)
Customer (lookup on account)
EntityB contains the following field:
Beneficiary (lookup on either contact or account)
A button must be added to the ribbon of the form of EntityA. When clicking this button a dialog must start where the user can make a selection wether to use field ContactA, ContactB or Customer. When the selection is made and the dialog is closed, a new EntityB must be created and sets the value of field Beneficiary to the value that is selected in the dialog.
Also the form of EntityB must get a new button in the ribbon. When this button is clicked a report on the report server is executed. The report must not be shown but instead a PDF must be generated that has to be attached to an email activity and the email must be send to the beneficiary.
I'm afraid that not all requirements are possible in CRM 2011:
Is is possible to create a lookup on 2 or more entities (like OwnerId that can look up SystemUser and Team values)?
Is it possible to start a dialog from a ribbon button?
Is it possible to use values from an existing entity in a dialog?
Is it possible to instantly generate a pdf from a report to add it as a mailattachment?
The CRM environment is partner hosted, but CRM is not sandboxed and local resources can be used.
An other option that comes to mind is instead of creating it all in CRM 2011, to create an external webapplication to overcome some of the bottlenecks. Would this be a possibility or is it just a bad idea?
Thanks for your advise!
Is is possible to create a lookup on 2 or more entities (like OwnerId that can look up SystemUser and Team values)? - Answer: No. Check this link. But you can solve this with two lookup fields and one option set which will be filter field.
Is it possible to start a dialog from a ribbon button? - Answer: Yes. You have a lot of articles on this topic.
Is it possible to use values from an existing entity in a dialog? - Answer: Yes. You can use values of selected entity, for which you are start dialog. Also check those links for creating dialogs.
Is it possible to instantly generate a pdf from a report to add it as a mailattachment? - Answer: I don't have experience with this, but some articles says that it is possible. Check this two posts.
I hope this will help :)

Resources