
Hi,
I have built a custom list page for sales and marketing and linked an info part to the list page to return related sales quotations.
There is a relationship between the sales quotation and the new entity created for the list page whereby the RECID of the new entity is written against a custom field in the SalesQuotationTable.
I have created a query where the custom entity is the primary data source and then SalesQuotationTable is related to this via the relations option set to YES.
I have then set the InfoPart properties to isLinked YES and datasource to custom entity and selfLink selected below this.
When I click on the quotationId in the info part hyperlink to open the quotation it simply returns No record and a blank salesquotationtable form.
My concern is that I am missing something in the code of the SalesQuotationForm possibly around the init method or something - I traced this through and I can clearly see my related sales quotation being assigned to the callerrecord variable so in theory the form should open this quotation.
I am pretty sure this is working fine because I have the same setup done for Sales Orders and this works fine every time.
Has any experienced this or can point me in the right direction for a resolution?
*This post is locked for comments
I have the same question (0)Just an update for anyone with a similar issue.
Unlike sales orders, the sales quotation form has a method called initRanges on the datasource SalesQuotationTable.
This method has workerResponsibleRange setup as a range on the query.
The problem is that if you create a custom list page or caller form, the system will use the worker Id of the current worker - i.e. whoever clicks on the link on the info part.
This means that if your workerId is not against the sales quotation you need to open then the system will not find your quotation and hence return the No Record option at the top of the form.
As a workaround, I will be coding in some code to set the worker Id range to disabled where the form's caller is my new list page. I have tested simply removing the call to the range value in the method initUserInfo and this works perfectly.